/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('snsu', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddCidrInVtuneInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  cidrs?: [ string ](name='Cidrs'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
  vtuneId?: string(name='VtuneId'),
}

model AddCidrInVtuneInstanceResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model AddCidrInVtuneInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddCidrInVtuneInstanceResponseBody(name='body'),
}

async function addCidrInVtuneInstanceWithOptions(request: AddCidrInVtuneInstanceRequest, runtime: Util.RuntimeOptions): AddCidrInVtuneInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.cidrs)) {
    body['Cidrs'] = request.cidrs;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  if (!Util.isUnset(request.vtuneId)) {
    body['VtuneId'] = request.vtuneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddCidrInVtuneInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addCidrInVtuneInstance(request: AddCidrInVtuneInstanceRequest): AddCidrInVtuneInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return addCidrInVtuneInstanceWithOptions(request, runtime);
}

model AddEPNInstanceRequest {
  accelerate?: boolean(name='Accelerate'),
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  dscp?: int32(name='Dscp'),
  enable?: boolean(name='Enable'),
  endTime?: string(name='EndTime'),
  epnName?: string(name='EpnName'),
  fromType?: int32(name='FromType'),
  limitRx?: long(name='LimitRx'),
  limitTx?: long(name='LimitTx'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  security?: boolean(name='Security'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  startTime?: string(name='StartTime'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model AddEPNInstanceResponseBody = {
  code?: string(name='Code'),
  content?: {
    epnId?: string(name='EpnId'),
  }(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model AddEPNInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddEPNInstanceResponseBody(name='body'),
}

async function addEPNInstanceWithOptions(request: AddEPNInstanceRequest, runtime: Util.RuntimeOptions): AddEPNInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accelerate)) {
    body['Accelerate'] = request.accelerate;
  }
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.dscp)) {
    body['Dscp'] = request.dscp;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.epnName)) {
    body['EpnName'] = request.epnName;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.limitRx)) {
    body['LimitRx'] = request.limitRx;
  }
  if (!Util.isUnset(request.limitTx)) {
    body['LimitTx'] = request.limitTx;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.security)) {
    body['Security'] = request.security;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddEPNInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addEPNInstance(request: AddEPNInstanceRequest): AddEPNInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return addEPNInstanceWithOptions(request, runtime);
}

model AddEvgwInEpnRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  epnId?: string(name='EpnId'),
  evgwRegion?: [ 
    {
      evgwId?: string(name='EvgwId'),
      regionId?: string(name='RegionId'),
    }
  ](name='EvgwRegion'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model AddEvgwInEpnResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model AddEvgwInEpnResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddEvgwInEpnResponseBody(name='body'),
}

async function addEvgwInEpnWithOptions(request: AddEvgwInEpnRequest, runtime: Util.RuntimeOptions): AddEvgwInEpnResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.epnId)) {
    body['EpnId'] = request.epnId;
  }
  if (!Util.isUnset(request.evgwRegion)) {
    body['EvgwRegion'] = request.evgwRegion;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddEvgwInEpn',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addEvgwInEpn(request: AddEvgwInEpnRequest): AddEvgwInEpnResponse {
  var runtime = new Util.RuntimeOptions{};
  return addEvgwInEpnWithOptions(request, runtime);
}

model AddEvgwInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  evgwName?: string(name='EvgwName'),
  fromType?: int32(name='FromType'),
  ipsecPsk?: string(name='IpsecPsk'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  regionId?: string(name='RegionId'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model AddEvgwInstanceResponseBody = {
  code?: string(name='Code'),
  content?: {
    evgwId?: string(name='EvgwId'),
  }(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model AddEvgwInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddEvgwInstanceResponseBody(name='body'),
}

async function addEvgwInstanceWithOptions(request: AddEvgwInstanceRequest, runtime: Util.RuntimeOptions): AddEvgwInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.evgwName)) {
    body['EvgwName'] = request.evgwName;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.ipsecPsk)) {
    body['IpsecPsk'] = request.ipsecPsk;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.regionId)) {
    body['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddEvgwInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addEvgwInstance(request: AddEvgwInstanceRequest): AddEvgwInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return addEvgwInstanceWithOptions(request, runtime);
}

model AddVtuneInEvgwRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  evgwId?: string(name='EvgwId'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  priority?: int32(name='Priority'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
  vtuneId?: string(name='VtuneId'),
}

model AddVtuneInEvgwResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model AddVtuneInEvgwResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddVtuneInEvgwResponseBody(name='body'),
}

async function addVtuneInEvgwWithOptions(request: AddVtuneInEvgwRequest, runtime: Util.RuntimeOptions): AddVtuneInEvgwResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.evgwId)) {
    body['EvgwId'] = request.evgwId;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.priority)) {
    body['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  if (!Util.isUnset(request.vtuneId)) {
    body['VtuneId'] = request.vtuneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddVtuneInEvgw',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addVtuneInEvgw(request: AddVtuneInEvgwRequest): AddVtuneInEvgwResponse {
  var runtime = new Util.RuntimeOptions{};
  return addVtuneInEvgwWithOptions(request, runtime);
}

model AddVtuneInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  cidrs?: [ string ](name='Cidrs'),
  clientIP?: string(name='ClientIP'),
  cpeId?: string(name='CpeId'),
  dhcp?: boolean(name='Dhcp'),
  enable?: boolean(name='Enable'),
  enableBgp?: boolean(name='EnableBgp'),
  fromType?: int32(name='FromType'),
  limitRx?: long(name='LimitRx'),
  limitTx?: long(name='LimitTx'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  partner?: string(name='Partner'),
  priority?: int32(name='Priority'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  ptUuid?: string(name='PtUuid'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model AddVtuneInstanceResponseBody = {
  code?: string(name='Code'),
  content?: {
    vtuneId?: string(name='VtuneId'),
  }(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model AddVtuneInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddVtuneInstanceResponseBody(name='body'),
}

async function addVtuneInstanceWithOptions(request: AddVtuneInstanceRequest, runtime: Util.RuntimeOptions): AddVtuneInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.cidrs)) {
    body['Cidrs'] = request.cidrs;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.cpeId)) {
    body['CpeId'] = request.cpeId;
  }
  if (!Util.isUnset(request.dhcp)) {
    body['Dhcp'] = request.dhcp;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.enableBgp)) {
    body['EnableBgp'] = request.enableBgp;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.limitRx)) {
    body['LimitRx'] = request.limitRx;
  }
  if (!Util.isUnset(request.limitTx)) {
    body['LimitTx'] = request.limitTx;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.partner)) {
    body['Partner'] = request.partner;
  }
  if (!Util.isUnset(request.priority)) {
    body['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.ptUuid)) {
    body['PtUuid'] = request.ptUuid;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddVtuneInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addVtuneInstance(request: AddVtuneInstanceRequest): AddVtuneInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return addVtuneInstanceWithOptions(request, runtime);
}

model CompleteCommodityInfoRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  data?: string(name='data'),
}

model CompleteCommodityInfoResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
}

model CompleteCommodityInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CompleteCommodityInfoResponseBody(name='body'),
}

async function completeCommodityInfoWithOptions(request: CompleteCommodityInfoRequest, runtime: Util.RuntimeOptions): CompleteCommodityInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.prodCode)) {
    query['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.data)) {
    query['data'] = request.data;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CompleteCommodityInfo',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function completeCommodityInfo(request: CompleteCommodityInfoRequest): CompleteCommodityInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return completeCommodityInfoWithOptions(request, runtime);
}

model CreateEBIRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  expInfo?: string(name='ExpInfo'),
  fromType?: int32(name='FromType'),
  gateway?: string(name='Gateway'),
  ipInfo?: [ 
    {
      ip?: string(name='Ip'),
      vlan?: long(name='Vlan'),
    }
  ](name='IpInfo'),
  mfaPresent?: boolean(name='MfaPresent'),
  networkId?: string(name='NetworkId'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  regionId?: string(name='RegionId'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model CreateEBIResponseBody = {
  code?: string(name='Code'),
  desc?: string(name='Desc'),
  model?: {
    content?: {
      ebiId?: string(name='EbiId'),
      status?: string(name='Status'),
    }(name='Content'),
    description?: string(name='Description'),
    requestId?: string(name='RequestId'),
    retCode?: int32(name='RetCode'),
  }(name='Model'),
  queryCount?: int32(name='QueryCount'),
  request?: {
    isSync?: boolean(name='IsSync'),
    order?: {
      account?: {
        acctId?: long(name='AcctId'),
        acctName?: string(name='AcctName'),
        acctType?: string(name='AcctType'),
        billType?: int32(name='BillType'),
        controlType?: long(name='ControlType'),
        creditList?: [ 
          {
            accountId?: long(name='AccountId'),
            accountName?: string(name='AccountName'),
            creditBalance?: long(name='CreditBalance'),
            custId?: long(name='CustId'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            remarks?: string(name='Remarks'),
          }
        ](name='CreditList'),
        dataStatus?: int32(name='DataStatus'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        insStatus?: int32(name='InsStatus'),
        remarks?: string(name='Remarks'),
      }(name='Account'),
      assets?: {
        activeTime?: string(name='ActiveTime'),
        assetsId?: long(name='AssetsId'),
        assetsName?: string(name='AssetsName'),
        assetsOwner?: string(name='AssetsOwner'),
        assetsStatus?: int32(name='AssetsStatus'),
        assetsTag?: long(name='AssetsTag'),
        assetsType?: int32(name='AssetsType'),
        attributeList?: [ 
          {
            attrGroup?: string(name='AttrGroup'),
            attrId?: long(name='AttrId'),
            attrName?: string(name='AttrName'),
            attrText?: string(name='AttrText'),
            attrValue?: string(name='AttrValue'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            mappingCode?: string(name='MappingCode'),
            oldAttrText?: string(name='OldAttrText'),
            oldAttrValue?: string(name='OldAttrValue'),
            options?: long(name='Options'),
            remarks?: string(name='Remarks'),
            valueExpression?: string(name='ValueExpression'),
          }
        ](name='AttributeList'),
        billId?: string(name='BillId'),
        billSource?: string(name='BillSource'),
        channelId?: string(name='ChannelId'),
        dataStatus?: int32(name='DataStatus'),
        destroyTime?: string(name='DestroyTime'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        groupPath?: string(name='GroupPath'),
        imsi?: string(name='Imsi'),
        insStatus?: int32(name='InsStatus'),
        osStatus?: string(name='OsStatus'),
        osTime?: string(name='OsTime'),
        ownerAssetsId?: long(name='OwnerAssetsId'),
        password?: string(name='Password'),
        preDestroyTime?: string(name='PreDestroyTime'),
        productLineCode?: string(name='ProductLineCode'),
        realBillNumber?: string(name='RealBillNumber'),
        remarks?: string(name='Remarks'),
        resCode?: string(name='ResCode'),
      }(name='Assets'),
      busiOperation?: {
        operationCode?: string(name='OperationCode'),
        operationId?: long(name='OperationId'),
        operationName?: string(name='OperationName'),
      }(name='BusiOperation'),
      busiOperator?: string(name='BusiOperator'),
      busiPriceList?: [ 
        {
          alipayOrderNo?: string(name='AlipayOrderNo'),
          busiOperationId?: long(name='BusiOperationId'),
          busiPriceDetailList?: [ 
            {
              outerOrderNo?: string(name='OuterOrderNo'),
              paidAmount?: long(name='PaidAmount'),
              paymentMode?: string(name='PaymentMode'),
            }
          ](name='BusiPriceDetailList'),
          offerId?: long(name='OfferId'),
          orderChannel?: string(name='OrderChannel'),
          outerOrderNo?: string(name='OuterOrderNo'),
          paidAmount?: long(name='PaidAmount'),
          receivableAmount?: long(name='ReceivableAmount'),
          subjectId?: string(name='SubjectId'),
        }
      ](name='BusiPriceList'),
      channelId?: string(name='ChannelId'),
      customer?: {
        certAddress?: string(name='CertAddress'),
        certEffdate?: string(name='CertEffdate'),
        certExpire?: string(name='CertExpire'),
        certNo?: string(name='CertNo'),
        certType?: string(name='CertType'),
        contracts?: [ 
          {
            contactAddress?: string(name='ContactAddress'),
            contactName?: string(name='ContactName'),
            contactPhone?: string(name='ContactPhone'),
            contactType?: int32(name='ContactType'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            remarks?: string(name='Remarks'),
          }
        ](name='Contracts'),
        custId?: long(name='CustId'),
        custName?: string(name='CustName'),
        custTag?: long(name='CustTag'),
        custType?: string(name='CustType'),
        dataStatus?: int32(name='DataStatus'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gender?: int32(name='Gender'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        insStatus?: int32(name='InsStatus'),
        outerCustNo?: string(name='OuterCustNo'),
        remarks?: string(name='Remarks'),
        userBindType?: int32(name='UserBindType'),
        userId?: long(name='UserId'),
        userNick?: string(name='UserNick'),
      }(name='Customer'),
      dataStatus?: int32(name='DataStatus'),
      extInfo?: map[string]string(name='ExtInfo'),
      isAuth?: boolean(name='IsAuth'),
      offerList?: [ 
        {
          attributeList?: [ 
            {
              attrGroup?: string(name='AttrGroup'),
              attrId?: long(name='AttrId'),
              attrName?: string(name='AttrName'),
              attrText?: string(name='AttrText'),
              attrValue?: string(name='AttrValue'),
              dataStatus?: int32(name='DataStatus'),
              effectiveTime?: string(name='EffectiveTime'),
              expireTime?: string(name='ExpireTime'),
              gmtCreate?: string(name='GmtCreate'),
              gmtModified?: string(name='GmtModified'),
              insStatus?: int32(name='InsStatus'),
              mappingCode?: string(name='MappingCode'),
              oldAttrText?: string(name='OldAttrText'),
              oldAttrValue?: string(name='OldAttrValue'),
              options?: long(name='Options'),
              remarks?: string(name='Remarks'),
              valueExpression?: string(name='ValueExpression'),
            }
          ](name='AttributeList'),
          billingPkgId?: long(name='BillingPkgId'),
          dataStatus?: int32(name='DataStatus'),
          effParam?: string(name='EffParam'),
          effectiveTime?: string(name='EffectiveTime'),
          effectiveType?: string(name='EffectiveType'),
          expParam?: string(name='ExpParam'),
          expireTime?: string(name='ExpireTime'),
          expireType?: string(name='ExpireType'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insOfferId?: long(name='InsOfferId'),
          insStatus?: int32(name='InsStatus'),
          offerId?: long(name='OfferId'),
          offerName?: string(name='OfferName'),
          offerType?: string(name='OfferType'),
          oldEffectiveTime?: string(name='OldEffectiveTime'),
          oldInsOfferId?: long(name='OldInsOfferId'),
          oldOfferId?: long(name='OldOfferId'),
          operationId?: long(name='OperationId'),
          options?: long(name='Options'),
          ordType?: string(name='OrdType'),
          product?: {
            attributeList?: [ 
              {
                attrGroup?: string(name='AttrGroup'),
                attrId?: long(name='AttrId'),
                attrName?: string(name='AttrName'),
                attrText?: string(name='AttrText'),
                attrValue?: string(name='AttrValue'),
                dataStatus?: int32(name='DataStatus'),
                effectiveTime?: string(name='EffectiveTime'),
                expireTime?: string(name='ExpireTime'),
                gmtCreate?: string(name='GmtCreate'),
                gmtModified?: string(name='GmtModified'),
                insStatus?: int32(name='InsStatus'),
                mappingCode?: string(name='MappingCode'),
                oldAttrText?: string(name='OldAttrText'),
                oldAttrValue?: string(name='OldAttrValue'),
                options?: long(name='Options'),
                remarks?: string(name='Remarks'),
                valueExpression?: string(name='ValueExpression'),
              }
            ](name='AttributeList'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            effectiveType?: string(name='EffectiveType'),
            expireTime?: string(name='ExpireTime'),
            expireType?: string(name='ExpireType'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insProductId?: long(name='InsProductId'),
            insStatus?: int32(name='InsStatus'),
            isMain?: string(name='IsMain'),
            openStatus?: int32(name='OpenStatus'),
            operateTime?: string(name='OperateTime'),
            operationId?: long(name='OperationId'),
            options?: long(name='Options'),
            productId?: long(name='ProductId'),
            productName?: string(name='ProductName'),
            productType?: string(name='ProductType'),
            remarks?: string(name='Remarks'),
          }(name='Product'),
          remarks?: string(name='Remarks'),
        }
      ](name='OfferList'),
      openCompletedTime?: string(name='OpenCompletedTime'),
      orderId?: long(name='OrderId'),
      orderNo?: string(name='OrderNo'),
      orderSerialId?: long(name='OrderSerialId'),
      orderStatus?: string(name='OrderStatus'),
      orderTime?: string(name='OrderTime'),
      orderType?: string(name='OrderType'),
      ownerId?: string(name='OwnerId'),
      parentOrderId?: string(name='ParentOrderId'),
      productList?: [ 
        {
          attributeList?: [ 
            {
              attrGroup?: string(name='AttrGroup'),
              attrId?: long(name='AttrId'),
              attrName?: string(name='AttrName'),
              attrText?: string(name='AttrText'),
              attrValue?: string(name='AttrValue'),
              dataStatus?: int32(name='DataStatus'),
              effectiveTime?: string(name='EffectiveTime'),
              expireTime?: string(name='ExpireTime'),
              gmtCreate?: string(name='GmtCreate'),
              gmtModified?: string(name='GmtModified'),
              insStatus?: int32(name='InsStatus'),
              mappingCode?: string(name='MappingCode'),
              oldAttrText?: string(name='OldAttrText'),
              oldAttrValue?: string(name='OldAttrValue'),
              options?: long(name='Options'),
              remarks?: string(name='Remarks'),
              valueExpression?: string(name='ValueExpression'),
            }
          ](name='AttributeList'),
          dataStatus?: int32(name='DataStatus'),
          effectiveTime?: string(name='EffectiveTime'),
          effectiveType?: string(name='EffectiveType'),
          expireTime?: string(name='ExpireTime'),
          expireType?: string(name='ExpireType'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insProductId?: long(name='InsProductId'),
          insStatus?: int32(name='InsStatus'),
          isMain?: string(name='IsMain'),
          openStatus?: int32(name='OpenStatus'),
          operateTime?: string(name='OperateTime'),
          operationId?: long(name='OperationId'),
          options?: long(name='Options'),
          productId?: long(name='ProductId'),
          productName?: string(name='ProductName'),
          productType?: string(name='ProductType'),
          remarks?: string(name='Remarks'),
        }
      ](name='ProductList'),
      remarks?: string(name='Remarks'),
      ruleList?: [ 
        {
          actOnInsOfferId?: long(name='ActOnInsOfferId'),
          actOnOperationId?: long(name='ActOnOperationId'),
          actOnUserId?: long(name='ActOnUserId'),
          dataStatus?: int32(name='DataStatus'),
          effectiveTime?: string(name='EffectiveTime'),
          expireTime?: string(name='ExpireTime'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insStatus?: int32(name='InsStatus'),
          message?: string(name='Message'),
          remarks?: string(name='Remarks'),
          resultCode?: string(name='ResultCode'),
          ruleCode?: string(name='RuleCode'),
          ruleId?: string(name='RuleId'),
          ruleName?: string(name='RuleName'),
          ruleStatus?: string(name='RuleStatus'),
          triggerInsOfferId?: long(name='TriggerInsOfferId'),
        }
      ](name='RuleList'),
    }(name='Order'),
    serialNo?: string(name='SerialNo'),
  }(name='Request'),
  success?: boolean(name='Success'),
}

model CreateEBIResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateEBIResponseBody(name='body'),
}

async function createEBIWithOptions(request: CreateEBIRequest, runtime: Util.RuntimeOptions): CreateEBIResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.expInfo)) {
    body['ExpInfo'] = request.expInfo;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.gateway)) {
    body['Gateway'] = request.gateway;
  }
  if (!Util.isUnset(request.ipInfo)) {
    body['IpInfo'] = request.ipInfo;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.networkId)) {
    body['NetworkId'] = request.networkId;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.regionId)) {
    body['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateEBI',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createEBI(request: CreateEBIRequest): CreateEBIResponse {
  var runtime = new Util.RuntimeOptions{};
  return createEBIWithOptions(request, runtime);
}

model CreateOrderCallBackRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  data?: string(name='data'),
}

model CreateOrderCallBackResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
  synchro?: string(name='Synchro'),
}

model CreateOrderCallBackResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateOrderCallBackResponseBody(name='body'),
}

async function createOrderCallBackWithOptions(request: CreateOrderCallBackRequest, runtime: Util.RuntimeOptions): CreateOrderCallBackResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.prodCode)) {
    query['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.data)) {
    query['data'] = request.data;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateOrderCallBack',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createOrderCallBack(request: CreateOrderCallBackRequest): CreateOrderCallBackResponse {
  var runtime = new Util.RuntimeOptions{};
  return createOrderCallBackWithOptions(request, runtime);
}

model DeleteCidrInVtuneInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  cidrs?: [ string ](name='Cidrs'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
  vtuneId?: string(name='VtuneId'),
}

model DeleteCidrInVtuneInstanceResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model DeleteCidrInVtuneInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCidrInVtuneInstanceResponseBody(name='body'),
}

async function deleteCidrInVtuneInstanceWithOptions(request: DeleteCidrInVtuneInstanceRequest, runtime: Util.RuntimeOptions): DeleteCidrInVtuneInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.cidrs)) {
    body['Cidrs'] = request.cidrs;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  if (!Util.isUnset(request.vtuneId)) {
    body['VtuneId'] = request.vtuneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCidrInVtuneInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCidrInVtuneInstance(request: DeleteCidrInVtuneInstanceRequest): DeleteCidrInVtuneInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCidrInVtuneInstanceWithOptions(request, runtime);
}

model DeleteEBIRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  ebiId?: string(name='EbiId'),
  enable?: boolean(name='Enable'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model DeleteEBIResponseBody = {
  code?: string(name='Code'),
  desc?: string(name='Desc'),
  model?: {
    content?: {
      ebiId?: string(name='EbiId'),
      status?: string(name='Status'),
    }(name='Content'),
    description?: string(name='Description'),
    requestId?: string(name='RequestId'),
    retCode?: int32(name='RetCode'),
  }(name='Model'),
  queryCount?: int32(name='QueryCount'),
  request?: {
    isSync?: boolean(name='IsSync'),
    order?: {
      account?: {
        acctId?: long(name='AcctId'),
        acctName?: string(name='AcctName'),
        acctType?: string(name='AcctType'),
        billType?: int32(name='BillType'),
        controlType?: long(name='ControlType'),
        creditList?: [ 
          {
            accountId?: long(name='AccountId'),
            accountName?: string(name='AccountName'),
            creditBalance?: long(name='CreditBalance'),
            custId?: long(name='CustId'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            remarks?: string(name='Remarks'),
          }
        ](name='CreditList'),
        dataStatus?: int32(name='DataStatus'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        insStatus?: int32(name='InsStatus'),
        remarks?: string(name='Remarks'),
      }(name='Account'),
      assets?: {
        activeTime?: string(name='ActiveTime'),
        assetsId?: long(name='AssetsId'),
        assetsName?: string(name='AssetsName'),
        assetsOwner?: string(name='AssetsOwner'),
        assetsStatus?: int32(name='AssetsStatus'),
        assetsTag?: long(name='AssetsTag'),
        assetsType?: int32(name='AssetsType'),
        attributeList?: [ 
          {
            attrGroup?: string(name='AttrGroup'),
            attrId?: long(name='AttrId'),
            attrName?: string(name='AttrName'),
            attrText?: string(name='AttrText'),
            attrValue?: string(name='AttrValue'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            mappingCode?: string(name='MappingCode'),
            oldAttrText?: string(name='OldAttrText'),
            oldAttrValue?: string(name='OldAttrValue'),
            options?: long(name='Options'),
            remarks?: string(name='Remarks'),
            valueExpression?: string(name='ValueExpression'),
          }
        ](name='AttributeList'),
        billId?: string(name='BillId'),
        billSource?: string(name='BillSource'),
        channelId?: string(name='ChannelId'),
        dataStatus?: int32(name='DataStatus'),
        destroyTime?: string(name='DestroyTime'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        groupPath?: string(name='GroupPath'),
        imsi?: string(name='Imsi'),
        insStatus?: int32(name='InsStatus'),
        osStatus?: string(name='OsStatus'),
        osTime?: string(name='OsTime'),
        ownerAssetsId?: long(name='OwnerAssetsId'),
        password?: string(name='Password'),
        preDestroyTime?: string(name='PreDestroyTime'),
        productLineCode?: string(name='ProductLineCode'),
        realBillNumber?: string(name='RealBillNumber'),
        remarks?: string(name='Remarks'),
        resCode?: string(name='ResCode'),
      }(name='Assets'),
      busiOperation?: {
        operationCode?: string(name='OperationCode'),
        operationId?: long(name='OperationId'),
        operationName?: string(name='OperationName'),
      }(name='BusiOperation'),
      busiOperator?: string(name='BusiOperator'),
      busiPriceList?: [ 
        {
          alipayOrderNo?: string(name='AlipayOrderNo'),
          busiOperationId?: long(name='BusiOperationId'),
          busiPriceDetailList?: [ 
            {
              outerOrderNo?: string(name='OuterOrderNo'),
              paidAmount?: long(name='PaidAmount'),
              paymentMode?: string(name='PaymentMode'),
            }
          ](name='BusiPriceDetailList'),
          offerId?: long(name='OfferId'),
          orderChannel?: string(name='OrderChannel'),
          outerOrderNo?: string(name='OuterOrderNo'),
          paidAmount?: long(name='PaidAmount'),
          receivableAmount?: long(name='ReceivableAmount'),
          subjectId?: string(name='SubjectId'),
        }
      ](name='BusiPriceList'),
      channelId?: string(name='ChannelId'),
      customer?: {
        certAddress?: string(name='CertAddress'),
        certEffdate?: string(name='CertEffdate'),
        certExpire?: string(name='CertExpire'),
        certNo?: string(name='CertNo'),
        certType?: string(name='CertType'),
        contracts?: [ 
          {
            contactAddress?: string(name='ContactAddress'),
            contactName?: string(name='ContactName'),
            contactPhone?: string(name='ContactPhone'),
            contactType?: int32(name='ContactType'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            remarks?: string(name='Remarks'),
          }
        ](name='Contracts'),
        custId?: long(name='CustId'),
        custName?: string(name='CustName'),
        custTag?: long(name='CustTag'),
        custType?: string(name='CustType'),
        dataStatus?: int32(name='DataStatus'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gender?: int32(name='Gender'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        insStatus?: int32(name='InsStatus'),
        outerCustNo?: string(name='OuterCustNo'),
        remarks?: string(name='Remarks'),
        userBindType?: int32(name='UserBindType'),
        userId?: long(name='UserId'),
        userNick?: string(name='UserNick'),
      }(name='Customer'),
      dataStatus?: int32(name='DataStatus'),
      extInfo?: map[string]string(name='ExtInfo'),
      isAuth?: boolean(name='IsAuth'),
      offerList?: [ 
        {
          attributeList?: [ 
            {
              attrGroup?: string(name='AttrGroup'),
              attrId?: long(name='AttrId'),
              attrName?: string(name='AttrName'),
              attrText?: string(name='AttrText'),
              attrValue?: string(name='AttrValue'),
              dataStatus?: int32(name='DataStatus'),
              effectiveTime?: string(name='EffectiveTime'),
              expireTime?: string(name='ExpireTime'),
              gmtCreate?: string(name='GmtCreate'),
              gmtModified?: string(name='GmtModified'),
              insStatus?: int32(name='InsStatus'),
              mappingCode?: string(name='MappingCode'),
              oldAttrText?: string(name='OldAttrText'),
              oldAttrValue?: string(name='OldAttrValue'),
              options?: long(name='Options'),
              remarks?: string(name='Remarks'),
              valueExpression?: string(name='ValueExpression'),
            }
          ](name='AttributeList'),
          billingPkgId?: long(name='BillingPkgId'),
          dataStatus?: int32(name='DataStatus'),
          effParam?: string(name='EffParam'),
          effectiveTime?: string(name='EffectiveTime'),
          effectiveType?: string(name='EffectiveType'),
          expParam?: string(name='ExpParam'),
          expireTime?: string(name='ExpireTime'),
          expireType?: string(name='ExpireType'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insOfferId?: long(name='InsOfferId'),
          insStatus?: int32(name='InsStatus'),
          offerId?: long(name='OfferId'),
          offerName?: string(name='OfferName'),
          offerType?: string(name='OfferType'),
          oldEffectiveTime?: string(name='OldEffectiveTime'),
          oldInsOfferId?: long(name='OldInsOfferId'),
          oldOfferId?: long(name='OldOfferId'),
          operationId?: long(name='OperationId'),
          options?: long(name='Options'),
          ordType?: string(name='OrdType'),
          product?: {
            attributeList?: [ 
              {
                attrGroup?: string(name='AttrGroup'),
                attrId?: long(name='AttrId'),
                attrName?: string(name='AttrName'),
                attrText?: string(name='AttrText'),
                attrValue?: string(name='AttrValue'),
                dataStatus?: int32(name='DataStatus'),
                effectiveTime?: string(name='EffectiveTime'),
                expireTime?: string(name='ExpireTime'),
                gmtCreate?: string(name='GmtCreate'),
                gmtModified?: string(name='GmtModified'),
                insStatus?: int32(name='InsStatus'),
                mappingCode?: string(name='MappingCode'),
                oldAttrText?: string(name='OldAttrText'),
                oldAttrValue?: string(name='OldAttrValue'),
                options?: long(name='Options'),
                remarks?: string(name='Remarks'),
                valueExpression?: string(name='ValueExpression'),
              }
            ](name='AttributeList'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            effectiveType?: string(name='EffectiveType'),
            expireTime?: string(name='ExpireTime'),
            expireType?: string(name='ExpireType'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insProductId?: long(name='InsProductId'),
            insStatus?: int32(name='InsStatus'),
            isMain?: string(name='IsMain'),
            openStatus?: int32(name='OpenStatus'),
            operateTime?: string(name='OperateTime'),
            operationId?: long(name='OperationId'),
            options?: long(name='Options'),
            productId?: long(name='ProductId'),
            productName?: string(name='ProductName'),
            productType?: string(name='ProductType'),
            remarks?: string(name='Remarks'),
          }(name='Product'),
          remarks?: string(name='Remarks'),
        }
      ](name='OfferList'),
      openCompletedTime?: string(name='OpenCompletedTime'),
      orderId?: long(name='OrderId'),
      orderNo?: string(name='OrderNo'),
      orderSerialId?: long(name='OrderSerialId'),
      orderStatus?: string(name='OrderStatus'),
      orderTime?: string(name='OrderTime'),
      orderType?: string(name='OrderType'),
      ownerId?: string(name='OwnerId'),
      parentOrderId?: string(name='ParentOrderId'),
      productList?: [ 
        {
          attributeList?: [ 
            {
              attrGroup?: string(name='AttrGroup'),
              attrId?: long(name='AttrId'),
              attrName?: string(name='AttrName'),
              attrText?: string(name='AttrText'),
              attrValue?: string(name='AttrValue'),
              dataStatus?: int32(name='DataStatus'),
              effectiveTime?: string(name='EffectiveTime'),
              expireTime?: string(name='ExpireTime'),
              gmtCreate?: string(name='GmtCreate'),
              gmtModified?: string(name='GmtModified'),
              insStatus?: int32(name='InsStatus'),
              mappingCode?: string(name='MappingCode'),
              oldAttrText?: string(name='OldAttrText'),
              oldAttrValue?: string(name='OldAttrValue'),
              options?: long(name='Options'),
              remarks?: string(name='Remarks'),
              valueExpression?: string(name='ValueExpression'),
            }
          ](name='AttributeList'),
          dataStatus?: int32(name='DataStatus'),
          effectiveTime?: string(name='EffectiveTime'),
          effectiveType?: string(name='EffectiveType'),
          expireTime?: string(name='ExpireTime'),
          expireType?: string(name='ExpireType'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insProductId?: long(name='InsProductId'),
          insStatus?: int32(name='InsStatus'),
          isMain?: string(name='IsMain'),
          openStatus?: int32(name='OpenStatus'),
          operateTime?: string(name='OperateTime'),
          operationId?: long(name='OperationId'),
          options?: long(name='Options'),
          productId?: long(name='ProductId'),
          productName?: string(name='ProductName'),
          productType?: string(name='ProductType'),
          remarks?: string(name='Remarks'),
        }
      ](name='ProductList'),
      remarks?: string(name='Remarks'),
      ruleList?: [ 
        {
          actOnInsOfferId?: long(name='ActOnInsOfferId'),
          actOnOperationId?: long(name='ActOnOperationId'),
          actOnUserId?: long(name='ActOnUserId'),
          dataStatus?: int32(name='DataStatus'),
          effectiveTime?: string(name='EffectiveTime'),
          expireTime?: string(name='ExpireTime'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insStatus?: int32(name='InsStatus'),
          message?: string(name='Message'),
          remarks?: string(name='Remarks'),
          resultCode?: string(name='ResultCode'),
          ruleCode?: string(name='RuleCode'),
          ruleId?: string(name='RuleId'),
          ruleName?: string(name='RuleName'),
          ruleStatus?: string(name='RuleStatus'),
          triggerInsOfferId?: long(name='TriggerInsOfferId'),
        }
      ](name='RuleList'),
    }(name='Order'),
    serialNo?: string(name='SerialNo'),
  }(name='Request'),
  success?: boolean(name='Success'),
}

model DeleteEBIResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteEBIResponseBody(name='body'),
}

async function deleteEBIWithOptions(request: DeleteEBIRequest, runtime: Util.RuntimeOptions): DeleteEBIResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.ebiId)) {
    body['EbiId'] = request.ebiId;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteEBI',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteEBI(request: DeleteEBIRequest): DeleteEBIResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteEBIWithOptions(request, runtime);
}

model DeleteEpnInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  epnId?: string(name='EpnId'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model DeleteEpnInstanceResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model DeleteEpnInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteEpnInstanceResponseBody(name='body'),
}

async function deleteEpnInstanceWithOptions(request: DeleteEpnInstanceRequest, runtime: Util.RuntimeOptions): DeleteEpnInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.epnId)) {
    body['EpnId'] = request.epnId;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteEpnInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteEpnInstance(request: DeleteEpnInstanceRequest): DeleteEpnInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteEpnInstanceWithOptions(request, runtime);
}

model DeleteEvgwInEpnRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  epnId?: string(name='EpnId'),
  evgwRegion?: [ 
    {
      evgwId?: string(name='EvgwId'),
      regionId?: string(name='RegionId'),
    }
  ](name='EvgwRegion'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model DeleteEvgwInEpnResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model DeleteEvgwInEpnResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteEvgwInEpnResponseBody(name='body'),
}

async function deleteEvgwInEpnWithOptions(request: DeleteEvgwInEpnRequest, runtime: Util.RuntimeOptions): DeleteEvgwInEpnResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.epnId)) {
    body['EpnId'] = request.epnId;
  }
  if (!Util.isUnset(request.evgwRegion)) {
    body['EvgwRegion'] = request.evgwRegion;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteEvgwInEpn',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteEvgwInEpn(request: DeleteEvgwInEpnRequest): DeleteEvgwInEpnResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteEvgwInEpnWithOptions(request, runtime);
}

model DeleteEvgwInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  evgwId?: string(name='EvgwId'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  regionId?: string(name='RegionId'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model DeleteEvgwInstanceResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model DeleteEvgwInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteEvgwInstanceResponseBody(name='body'),
}

async function deleteEvgwInstanceWithOptions(request: DeleteEvgwInstanceRequest, runtime: Util.RuntimeOptions): DeleteEvgwInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.evgwId)) {
    body['EvgwId'] = request.evgwId;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.regionId)) {
    body['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteEvgwInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteEvgwInstance(request: DeleteEvgwInstanceRequest): DeleteEvgwInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteEvgwInstanceWithOptions(request, runtime);
}

model DeleteVtuneInEvgwRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  evgwId?: string(name='EvgwId'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
  vtuneId?: string(name='VtuneId'),
}

model DeleteVtuneInEvgwResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model DeleteVtuneInEvgwResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteVtuneInEvgwResponseBody(name='body'),
}

async function deleteVtuneInEvgwWithOptions(request: DeleteVtuneInEvgwRequest, runtime: Util.RuntimeOptions): DeleteVtuneInEvgwResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.evgwId)) {
    body['EvgwId'] = request.evgwId;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  if (!Util.isUnset(request.vtuneId)) {
    body['VtuneId'] = request.vtuneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteVtuneInEvgw',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteVtuneInEvgw(request: DeleteVtuneInEvgwRequest): DeleteVtuneInEvgwResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteVtuneInEvgwWithOptions(request, runtime);
}

model DeleteVtuneInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
  vtuneId?: string(name='VtuneId'),
}

model DeleteVtuneInstanceResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model DeleteVtuneInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteVtuneInstanceResponseBody(name='body'),
}

async function deleteVtuneInstanceWithOptions(request: DeleteVtuneInstanceRequest, runtime: Util.RuntimeOptions): DeleteVtuneInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  if (!Util.isUnset(request.vtuneId)) {
    body['VtuneId'] = request.vtuneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteVtuneInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteVtuneInstance(request: DeleteVtuneInstanceRequest): DeleteVtuneInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteVtuneInstanceWithOptions(request, runtime);
}

model GetEVLTrafficDataRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  endTime?: string(name='EndTime'),
  fromType?: int32(name='FromType'),
  groupMethod?: string(name='GroupMethod'),
  groupType?: string(name='GroupType'),
  instanceId?: string(name='InstanceId'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  startTime?: string(name='StartTime'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model GetEVLTrafficDataResponseBody = {
  code?: string(name='Code'),
  desc?: string(name='Desc'),
  model?: {
    content?: [ 
      {
        bandWidthRx?: int32(name='BandWidthRx'),
        bandWidthTx?: int32(name='BandWidthTx'),
        ts?: string(name='Ts'),
      }
    ](name='Content'),
    description?: string(name='Description'),
    requestId?: string(name='RequestId'),
    retCode?: int32(name='RetCode'),
  }(name='Model'),
  queryCount?: int32(name='QueryCount'),
  request?: {
    isSync?: boolean(name='IsSync'),
    order?: {
      account?: {
        acctId?: long(name='AcctId'),
        acctName?: string(name='AcctName'),
        acctType?: string(name='AcctType'),
        billType?: int32(name='BillType'),
        controlType?: long(name='ControlType'),
        creditList?: [ 
          {
            accountId?: long(name='AccountId'),
            accountName?: string(name='AccountName'),
            creditBalance?: long(name='CreditBalance'),
            custId?: long(name='CustId'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            remarks?: string(name='Remarks'),
          }
        ](name='CreditList'),
        dataStatus?: int32(name='DataStatus'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        insStatus?: int32(name='InsStatus'),
        remarks?: string(name='Remarks'),
      }(name='Account'),
      assets?: {
        activeTime?: string(name='ActiveTime'),
        assetsId?: long(name='AssetsId'),
        assetsName?: string(name='AssetsName'),
        assetsOwner?: string(name='AssetsOwner'),
        assetsStatus?: int32(name='AssetsStatus'),
        assetsTag?: long(name='AssetsTag'),
        assetsType?: int32(name='AssetsType'),
        attributeList?: [ 
          {
            attrGroup?: string(name='AttrGroup'),
            attrId?: long(name='AttrId'),
            attrName?: string(name='AttrName'),
            attrText?: string(name='AttrText'),
            attrValue?: string(name='AttrValue'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            mappingCode?: string(name='MappingCode'),
            oldAttrText?: string(name='OldAttrText'),
            oldAttrValue?: string(name='OldAttrValue'),
            options?: long(name='Options'),
            remarks?: string(name='Remarks'),
            valueExpression?: string(name='ValueExpression'),
          }
        ](name='AttributeList'),
        billId?: string(name='BillId'),
        billSource?: string(name='BillSource'),
        channelId?: string(name='ChannelId'),
        dataStatus?: int32(name='DataStatus'),
        destroyTime?: string(name='DestroyTime'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        groupPath?: string(name='GroupPath'),
        imsi?: string(name='Imsi'),
        insStatus?: int32(name='InsStatus'),
        osStatus?: string(name='OsStatus'),
        osTime?: string(name='OsTime'),
        ownerAssetsId?: long(name='OwnerAssetsId'),
        password?: string(name='Password'),
        preDestroyTime?: string(name='PreDestroyTime'),
        productLineCode?: string(name='ProductLineCode'),
        realBillNumber?: string(name='RealBillNumber'),
        remarks?: string(name='Remarks'),
        resCode?: string(name='ResCode'),
      }(name='Assets'),
      busiOperation?: {
        operationCode?: string(name='OperationCode'),
        operationId?: long(name='OperationId'),
        operationName?: string(name='OperationName'),
      }(name='BusiOperation'),
      busiOperator?: string(name='BusiOperator'),
      busiPriceList?: [ 
        {
          alipayOrderNo?: string(name='AlipayOrderNo'),
          busiOperationId?: long(name='BusiOperationId'),
          busiPriceDetailList?: [ 
            {
              outerOrderNo?: string(name='OuterOrderNo'),
              paidAmount?: long(name='PaidAmount'),
              paymentMode?: string(name='PaymentMode'),
            }
          ](name='BusiPriceDetailList'),
          offerId?: long(name='OfferId'),
          orderChannel?: string(name='OrderChannel'),
          outerOrderNo?: string(name='OuterOrderNo'),
          paidAmount?: long(name='PaidAmount'),
          receivableAmount?: long(name='ReceivableAmount'),
          subjectId?: string(name='SubjectId'),
        }
      ](name='BusiPriceList'),
      channelId?: string(name='ChannelId'),
      customer?: {
        certAddress?: string(name='CertAddress'),
        certEffdate?: string(name='CertEffdate'),
        certExpire?: string(name='CertExpire'),
        certNo?: string(name='CertNo'),
        certType?: string(name='CertType'),
        contracts?: [ 
          {
            contactAddress?: string(name='ContactAddress'),
            contactName?: string(name='ContactName'),
            contactPhone?: string(name='ContactPhone'),
            contactType?: int32(name='ContactType'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            remarks?: string(name='Remarks'),
          }
        ](name='Contracts'),
        custId?: long(name='CustId'),
        custName?: string(name='CustName'),
        custTag?: long(name='CustTag'),
        custType?: string(name='CustType'),
        dataStatus?: int32(name='DataStatus'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gender?: int32(name='Gender'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        insStatus?: int32(name='InsStatus'),
        outerCustNo?: string(name='OuterCustNo'),
        remarks?: string(name='Remarks'),
        userBindType?: int32(name='UserBindType'),
        userId?: long(name='UserId'),
        userNick?: string(name='UserNick'),
      }(name='Customer'),
      dataStatus?: int32(name='DataStatus'),
      extInfo?: map[string]string(name='ExtInfo'),
      isAuth?: boolean(name='IsAuth'),
      offerList?: [ 
        {
          attributeList?: [ 
            {
              attrGroup?: string(name='AttrGroup'),
              attrId?: long(name='AttrId'),
              attrName?: string(name='AttrName'),
              attrText?: string(name='AttrText'),
              attrValue?: string(name='AttrValue'),
              dataStatus?: int32(name='DataStatus'),
              effectiveTime?: string(name='EffectiveTime'),
              expireTime?: string(name='ExpireTime'),
              gmtCreate?: string(name='GmtCreate'),
              gmtModified?: string(name='GmtModified'),
              insStatus?: int32(name='InsStatus'),
              mappingCode?: string(name='MappingCode'),
              oldAttrText?: string(name='OldAttrText'),
              oldAttrValue?: string(name='OldAttrValue'),
              options?: long(name='Options'),
              remarks?: string(name='Remarks'),
              valueExpression?: string(name='ValueExpression'),
            }
          ](name='AttributeList'),
          billingPkgId?: long(name='BillingPkgId'),
          dataStatus?: int32(name='DataStatus'),
          effParam?: string(name='EffParam'),
          effectiveTime?: string(name='EffectiveTime'),
          effectiveType?: string(name='EffectiveType'),
          expParam?: string(name='ExpParam'),
          expireTime?: string(name='ExpireTime'),
          expireType?: string(name='ExpireType'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insOfferId?: long(name='InsOfferId'),
          insStatus?: int32(name='InsStatus'),
          offerId?: long(name='OfferId'),
          offerName?: string(name='OfferName'),
          offerType?: string(name='OfferType'),
          oldEffectiveTime?: string(name='OldEffectiveTime'),
          oldInsOfferId?: long(name='OldInsOfferId'),
          oldOfferId?: long(name='OldOfferId'),
          operationId?: long(name='OperationId'),
          options?: long(name='Options'),
          ordType?: string(name='OrdType'),
          product?: {
            attributeList?: [ 
              {
                attrGroup?: string(name='AttrGroup'),
                attrId?: long(name='AttrId'),
                attrName?: string(name='AttrName'),
                attrText?: string(name='AttrText'),
                attrValue?: string(name='AttrValue'),
                dataStatus?: int32(name='DataStatus'),
                effectiveTime?: string(name='EffectiveTime'),
                expireTime?: string(name='ExpireTime'),
                gmtCreate?: string(name='GmtCreate'),
                gmtModified?: string(name='GmtModified'),
                insStatus?: int32(name='InsStatus'),
                mappingCode?: string(name='MappingCode'),
                oldAttrText?: string(name='OldAttrText'),
                oldAttrValue?: string(name='OldAttrValue'),
                options?: long(name='Options'),
                remarks?: string(name='Remarks'),
                valueExpression?: string(name='ValueExpression'),
              }
            ](name='AttributeList'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            effectiveType?: string(name='EffectiveType'),
            expireTime?: string(name='ExpireTime'),
            expireType?: string(name='ExpireType'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insProductId?: long(name='InsProductId'),
            insStatus?: int32(name='InsStatus'),
            isMain?: string(name='IsMain'),
            openStatus?: int32(name='OpenStatus'),
            operateTime?: string(name='OperateTime'),
            operationId?: long(name='OperationId'),
            options?: long(name='Options'),
            productId?: long(name='ProductId'),
            productName?: string(name='ProductName'),
            productType?: string(name='ProductType'),
            remarks?: string(name='Remarks'),
          }(name='Product'),
          remarks?: string(name='Remarks'),
        }
      ](name='OfferList'),
      openCompletedTime?: string(name='OpenCompletedTime'),
      orderId?: long(name='OrderId'),
      orderNo?: string(name='OrderNo'),
      orderSerialId?: long(name='OrderSerialId'),
      orderStatus?: string(name='OrderStatus'),
      orderTime?: string(name='OrderTime'),
      orderType?: string(name='OrderType'),
      ownerId?: string(name='OwnerId'),
      parentOrderId?: string(name='ParentOrderId'),
      productList?: [ 
        {
          attributeList?: [ 
            {
              attrGroup?: string(name='AttrGroup'),
              attrId?: long(name='AttrId'),
              attrName?: string(name='AttrName'),
              attrText?: string(name='AttrText'),
              attrValue?: string(name='AttrValue'),
              dataStatus?: int32(name='DataStatus'),
              effectiveTime?: string(name='EffectiveTime'),
              expireTime?: string(name='ExpireTime'),
              gmtCreate?: string(name='GmtCreate'),
              gmtModified?: string(name='GmtModified'),
              insStatus?: int32(name='InsStatus'),
              mappingCode?: string(name='MappingCode'),
              oldAttrText?: string(name='OldAttrText'),
              oldAttrValue?: string(name='OldAttrValue'),
              options?: long(name='Options'),
              remarks?: string(name='Remarks'),
              valueExpression?: string(name='ValueExpression'),
            }
          ](name='AttributeList'),
          dataStatus?: int32(name='DataStatus'),
          effectiveTime?: string(name='EffectiveTime'),
          effectiveType?: string(name='EffectiveType'),
          expireTime?: string(name='ExpireTime'),
          expireType?: string(name='ExpireType'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insProductId?: long(name='InsProductId'),
          insStatus?: int32(name='InsStatus'),
          isMain?: string(name='IsMain'),
          openStatus?: int32(name='OpenStatus'),
          operateTime?: string(name='OperateTime'),
          operationId?: long(name='OperationId'),
          options?: long(name='Options'),
          productId?: long(name='ProductId'),
          productName?: string(name='ProductName'),
          productType?: string(name='ProductType'),
          remarks?: string(name='Remarks'),
        }
      ](name='ProductList'),
      remarks?: string(name='Remarks'),
      ruleList?: [ 
        {
          actOnInsOfferId?: long(name='ActOnInsOfferId'),
          actOnOperationId?: long(name='ActOnOperationId'),
          actOnUserId?: long(name='ActOnUserId'),
          dataStatus?: int32(name='DataStatus'),
          effectiveTime?: string(name='EffectiveTime'),
          expireTime?: string(name='ExpireTime'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insStatus?: int32(name='InsStatus'),
          message?: string(name='Message'),
          remarks?: string(name='Remarks'),
          resultCode?: string(name='ResultCode'),
          ruleCode?: string(name='RuleCode'),
          ruleId?: string(name='RuleId'),
          ruleName?: string(name='RuleName'),
          ruleStatus?: string(name='RuleStatus'),
          triggerInsOfferId?: long(name='TriggerInsOfferId'),
        }
      ](name='RuleList'),
    }(name='Order'),
    serialNo?: string(name='SerialNo'),
  }(name='Request'),
  success?: boolean(name='Success'),
}

model GetEVLTrafficDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetEVLTrafficDataResponseBody(name='body'),
}

async function getEVLTrafficDataWithOptions(request: GetEVLTrafficDataRequest, runtime: Util.RuntimeOptions): GetEVLTrafficDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.groupMethod)) {
    body['GroupMethod'] = request.groupMethod;
  }
  if (!Util.isUnset(request.groupType)) {
    body['GroupType'] = request.groupType;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetEVLTrafficData',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getEVLTrafficData(request: GetEVLTrafficDataRequest): GetEVLTrafficDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEVLTrafficDataWithOptions(request, runtime);
}

model GetEpnInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  epnId?: string(name='EpnId'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model GetEpnInstanceResponseBody = {
  code?: string(name='Code'),
  content?: {
    ensgws?: [ string ](name='Ensgws'),
    evbrs?: [ string ](name='Evbrs'),
    evgws?: [ string ](name='Evgws'),
    netInfo?: {
      accelerate?: boolean(name='Accelerate'),
      aliuid?: long(name='Aliuid'),
      createTime?: string(name='CreateTime'),
      dscp?: int32(name='Dscp'),
      epnId?: string(name='EpnId'),
      epnName?: string(name='EpnName'),
      limitRx?: int32(name='LimitRx'),
      limitTx?: int32(name='LimitTx'),
      security?: boolean(name='Security'),
      startTime?: string(name='StartTime'),
      status?: int32(name='Status'),
    }(name='NetInfo'),
  }(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model GetEpnInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetEpnInstanceResponseBody(name='body'),
}

async function getEpnInstanceWithOptions(request: GetEpnInstanceRequest, runtime: Util.RuntimeOptions): GetEpnInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.epnId)) {
    body['EpnId'] = request.epnId;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetEpnInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getEpnInstance(request: GetEpnInstanceRequest): GetEpnInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEpnInstanceWithOptions(request, runtime);
}

model GetEvgwInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  evgwId?: string(name='EvgwId'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model GetEvgwInstanceResponseBody = {
  code?: string(name='Code'),
  content?: {
    evgwId?: string(name='EvgwId'),
    gwIp?: string(name='GwIp'),
    regionId?: string(name='RegionId'),
    vtunes?: [ string ](name='Vtunes'),
  }(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model GetEvgwInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetEvgwInstanceResponseBody(name='body'),
}

async function getEvgwInstanceWithOptions(request: GetEvgwInstanceRequest, runtime: Util.RuntimeOptions): GetEvgwInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.evgwId)) {
    body['EvgwId'] = request.evgwId;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetEvgwInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getEvgwInstance(request: GetEvgwInstanceRequest): GetEvgwInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEvgwInstanceWithOptions(request, runtime);
}

model GetEvgwRegionsRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model GetEvgwRegionsResponseBody = {
  code?: string(name='Code'),
  content?: [ string ](name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model GetEvgwRegionsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetEvgwRegionsResponseBody(name='body'),
}

async function getEvgwRegionsWithOptions(request: GetEvgwRegionsRequest, runtime: Util.RuntimeOptions): GetEvgwRegionsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetEvgwRegions',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getEvgwRegions(request: GetEvgwRegionsRequest): GetEvgwRegionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEvgwRegionsWithOptions(request, runtime);
}

model GetLLBZTrafficDataRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  endTime?: string(name='EndTime'),
  fromType?: int32(name='FromType'),
  groupMethod?: string(name='GroupMethod'),
  groupType?: string(name='GroupType'),
  instanceId?: string(name='InstanceId'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  startTime?: string(name='StartTime'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model GetLLBZTrafficDataResponseBody = {
  code?: string(name='Code'),
  desc?: string(name='Desc'),
  model?: {
    content?: [ 
      {
        bandwidth?: string(name='bandwidth'),
        ts?: string(name='ts'),
      }
    ](name='Content'),
    description?: string(name='Description'),
    requestId?: string(name='RequestId'),
    retCode?: int32(name='RetCode'),
  }(name='Model'),
  queryCount?: int32(name='QueryCount'),
  request?: {
    isSync?: boolean(name='IsSync'),
    order?: {
      account?: {
        acctId?: long(name='AcctId'),
        acctName?: string(name='AcctName'),
        acctType?: string(name='AcctType'),
        billType?: int32(name='BillType'),
        controlType?: long(name='ControlType'),
        creditList?: [ 
          {
            accountId?: long(name='AccountId'),
            accountName?: string(name='AccountName'),
            creditBalance?: long(name='CreditBalance'),
            custId?: long(name='CustId'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            remarks?: string(name='Remarks'),
          }
        ](name='CreditList'),
        dataStatus?: int32(name='DataStatus'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        insStatus?: int32(name='InsStatus'),
        remarks?: string(name='Remarks'),
      }(name='Account'),
      assets?: {
        activeTime?: string(name='ActiveTime'),
        assetsId?: long(name='AssetsId'),
        assetsName?: string(name='AssetsName'),
        assetsOwner?: string(name='AssetsOwner'),
        assetsStatus?: int32(name='AssetsStatus'),
        assetsTag?: long(name='AssetsTag'),
        assetsType?: int32(name='AssetsType'),
        attributeList?: [ 
          {
            attrGroup?: string(name='AttrGroup'),
            attrId?: long(name='AttrId'),
            attrName?: string(name='AttrName'),
            attrText?: string(name='AttrText'),
            attrValue?: string(name='AttrValue'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            mappingCode?: string(name='MappingCode'),
            oldAttrText?: string(name='OldAttrText'),
            oldAttrValue?: string(name='OldAttrValue'),
            options?: long(name='Options'),
            remarks?: string(name='Remarks'),
            valueExpression?: string(name='ValueExpression'),
          }
        ](name='AttributeList'),
        billId?: string(name='BillId'),
        billSource?: string(name='BillSource'),
        channelId?: string(name='ChannelId'),
        dataStatus?: int32(name='DataStatus'),
        destroyTime?: string(name='DestroyTime'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        groupPath?: string(name='GroupPath'),
        imsi?: string(name='Imsi'),
        insStatus?: int32(name='InsStatus'),
        osStatus?: string(name='OsStatus'),
        osTime?: string(name='OsTime'),
        ownerAssetsId?: long(name='OwnerAssetsId'),
        password?: string(name='Password'),
        preDestroyTime?: string(name='PreDestroyTime'),
        productLineCode?: string(name='ProductLineCode'),
        realBillNumber?: string(name='RealBillNumber'),
        remarks?: string(name='Remarks'),
        resCode?: string(name='ResCode'),
      }(name='Assets'),
      busiOperation?: {
        operationCode?: string(name='OperationCode'),
        operationId?: long(name='OperationId'),
        operationName?: string(name='OperationName'),
      }(name='BusiOperation'),
      busiOperator?: string(name='BusiOperator'),
      busiPriceList?: [ 
        {
          alipayOrderNo?: string(name='AlipayOrderNo'),
          busiOperationId?: long(name='BusiOperationId'),
          busiPriceDetailList?: [ 
            {
              outerOrderNo?: string(name='OuterOrderNo'),
              paidAmount?: long(name='PaidAmount'),
              paymentMode?: string(name='PaymentMode'),
            }
          ](name='BusiPriceDetailList'),
          offerId?: long(name='OfferId'),
          orderChannel?: string(name='OrderChannel'),
          outerOrderNo?: string(name='OuterOrderNo'),
          paidAmount?: long(name='PaidAmount'),
          receivableAmount?: long(name='ReceivableAmount'),
          subjectId?: string(name='SubjectId'),
        }
      ](name='BusiPriceList'),
      channelId?: string(name='ChannelId'),
      customer?: {
        certAddress?: string(name='CertAddress'),
        certEffdate?: string(name='CertEffdate'),
        certExpire?: string(name='CertExpire'),
        certNo?: string(name='CertNo'),
        certType?: string(name='CertType'),
        contracts?: [ 
          {
            contactAddress?: string(name='ContactAddress'),
            contactName?: string(name='ContactName'),
            contactPhone?: string(name='ContactPhone'),
            contactType?: int32(name='ContactType'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            remarks?: string(name='Remarks'),
          }
        ](name='Contracts'),
        custId?: long(name='CustId'),
        custName?: string(name='CustName'),
        custTag?: long(name='CustTag'),
        custType?: string(name='CustType'),
        dataStatus?: int32(name='DataStatus'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gender?: int32(name='Gender'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        insStatus?: int32(name='InsStatus'),
        outerCustNo?: string(name='OuterCustNo'),
        remarks?: string(name='Remarks'),
        userBindType?: int32(name='UserBindType'),
        userId?: long(name='UserId'),
        userNick?: string(name='UserNick'),
      }(name='Customer'),
      dataStatus?: int32(name='DataStatus'),
      extInfo?: map[string]string(name='ExtInfo'),
      isAuth?: boolean(name='IsAuth'),
      offerList?: [ 
        {
          attributeList?: [ 
            {
              attrGroup?: string(name='AttrGroup'),
              attrId?: long(name='AttrId'),
              attrName?: string(name='AttrName'),
              attrText?: string(name='AttrText'),
              attrValue?: string(name='AttrValue'),
              dataStatus?: int32(name='DataStatus'),
              effectiveTime?: string(name='EffectiveTime'),
              expireTime?: string(name='ExpireTime'),
              gmtCreate?: string(name='GmtCreate'),
              gmtModified?: string(name='GmtModified'),
              insStatus?: int32(name='InsStatus'),
              mappingCode?: string(name='MappingCode'),
              oldAttrText?: string(name='OldAttrText'),
              oldAttrValue?: string(name='OldAttrValue'),
              options?: long(name='Options'),
              remarks?: string(name='Remarks'),
              valueExpression?: string(name='ValueExpression'),
            }
          ](name='AttributeList'),
          billingPkgId?: long(name='BillingPkgId'),
          dataStatus?: int32(name='DataStatus'),
          effParam?: string(name='EffParam'),
          effectiveTime?: string(name='EffectiveTime'),
          effectiveType?: string(name='EffectiveType'),
          expParam?: string(name='ExpParam'),
          expireTime?: string(name='ExpireTime'),
          expireType?: string(name='ExpireType'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insOfferId?: long(name='InsOfferId'),
          insStatus?: int32(name='InsStatus'),
          offerId?: long(name='OfferId'),
          offerName?: string(name='OfferName'),
          offerType?: string(name='OfferType'),
          oldEffectiveTime?: string(name='OldEffectiveTime'),
          oldInsOfferId?: long(name='OldInsOfferId'),
          oldOfferId?: long(name='OldOfferId'),
          operationId?: long(name='OperationId'),
          options?: long(name='Options'),
          ordType?: string(name='OrdType'),
          product?: {
            attributeList?: [ 
              {
                attrGroup?: string(name='AttrGroup'),
                attrId?: long(name='AttrId'),
                attrName?: string(name='AttrName'),
                attrText?: string(name='AttrText'),
                attrValue?: string(name='AttrValue'),
                dataStatus?: int32(name='DataStatus'),
                effectiveTime?: string(name='EffectiveTime'),
                expireTime?: string(name='ExpireTime'),
                gmtCreate?: string(name='GmtCreate'),
                gmtModified?: string(name='GmtModified'),
                insStatus?: int32(name='InsStatus'),
                mappingCode?: string(name='MappingCode'),
                oldAttrText?: string(name='OldAttrText'),
                oldAttrValue?: string(name='OldAttrValue'),
                options?: long(name='Options'),
                remarks?: string(name='Remarks'),
                valueExpression?: string(name='ValueExpression'),
              }
            ](name='AttributeList'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            effectiveType?: string(name='EffectiveType'),
            expireTime?: string(name='ExpireTime'),
            expireType?: string(name='ExpireType'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insProductId?: long(name='InsProductId'),
            insStatus?: int32(name='InsStatus'),
            isMain?: string(name='IsMain'),
            openStatus?: int32(name='OpenStatus'),
            operateTime?: string(name='OperateTime'),
            operationId?: long(name='OperationId'),
            options?: long(name='Options'),
            productId?: long(name='ProductId'),
            productName?: string(name='ProductName'),
            productType?: string(name='ProductType'),
            remarks?: string(name='Remarks'),
          }(name='Product'),
          remarks?: string(name='Remarks'),
        }
      ](name='OfferList'),
      openCompletedTime?: string(name='OpenCompletedTime'),
      orderId?: long(name='OrderId'),
      orderNo?: string(name='OrderNo'),
      orderSerialId?: long(name='OrderSerialId'),
      orderStatus?: string(name='OrderStatus'),
      orderTime?: string(name='OrderTime'),
      orderType?: string(name='OrderType'),
      ownerId?: string(name='OwnerId'),
      parentOrderId?: string(name='ParentOrderId'),
      productList?: [ 
        {
          attributeList?: [ 
            {
              attrGroup?: string(name='AttrGroup'),
              attrId?: long(name='AttrId'),
              attrName?: string(name='AttrName'),
              attrText?: string(name='AttrText'),
              attrValue?: string(name='AttrValue'),
              dataStatus?: int32(name='DataStatus'),
              effectiveTime?: string(name='EffectiveTime'),
              expireTime?: string(name='ExpireTime'),
              gmtCreate?: string(name='GmtCreate'),
              gmtModified?: string(name='GmtModified'),
              insStatus?: int32(name='InsStatus'),
              mappingCode?: string(name='MappingCode'),
              oldAttrText?: string(name='OldAttrText'),
              oldAttrValue?: string(name='OldAttrValue'),
              options?: long(name='Options'),
              remarks?: string(name='Remarks'),
              valueExpression?: string(name='ValueExpression'),
            }
          ](name='AttributeList'),
          dataStatus?: int32(name='DataStatus'),
          effectiveTime?: string(name='EffectiveTime'),
          effectiveType?: string(name='EffectiveType'),
          expireTime?: string(name='ExpireTime'),
          expireType?: string(name='ExpireType'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insProductId?: long(name='InsProductId'),
          insStatus?: int32(name='InsStatus'),
          isMain?: string(name='IsMain'),
          openStatus?: int32(name='OpenStatus'),
          operateTime?: string(name='OperateTime'),
          operationId?: long(name='OperationId'),
          options?: long(name='Options'),
          productId?: long(name='ProductId'),
          productName?: string(name='ProductName'),
          productType?: string(name='ProductType'),
          remarks?: string(name='Remarks'),
        }
      ](name='ProductList'),
      remarks?: string(name='Remarks'),
      ruleList?: [ 
        {
          actOnInsOfferId?: long(name='ActOnInsOfferId'),
          actOnOperationId?: long(name='ActOnOperationId'),
          actOnUserId?: long(name='ActOnUserId'),
          dataStatus?: int32(name='DataStatus'),
          effectiveTime?: string(name='EffectiveTime'),
          expireTime?: string(name='ExpireTime'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insStatus?: int32(name='InsStatus'),
          message?: string(name='Message'),
          remarks?: string(name='Remarks'),
          resultCode?: string(name='ResultCode'),
          ruleCode?: string(name='RuleCode'),
          ruleId?: string(name='RuleId'),
          ruleName?: string(name='RuleName'),
          ruleStatus?: string(name='RuleStatus'),
          triggerInsOfferId?: long(name='TriggerInsOfferId'),
        }
      ](name='RuleList'),
    }(name='Order'),
    serialNo?: string(name='SerialNo'),
  }(name='Request'),
  success?: boolean(name='Success'),
}

model GetLLBZTrafficDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetLLBZTrafficDataResponseBody(name='body'),
}

async function getLLBZTrafficDataWithOptions(request: GetLLBZTrafficDataRequest, runtime: Util.RuntimeOptions): GetLLBZTrafficDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.groupMethod)) {
    body['GroupMethod'] = request.groupMethod;
  }
  if (!Util.isUnset(request.groupType)) {
    body['GroupType'] = request.groupType;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetLLBZTrafficData',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getLLBZTrafficData(request: GetLLBZTrafficDataRequest): GetLLBZTrafficDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLLBZTrafficDataWithOptions(request, runtime);
}

model GetVtuneConfigRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  epnId?: string(name='EpnId'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model GetVtuneConfigResponseBody = {
  code?: string(name='Code'),
  content?: {
    fqdn?: string(name='Fqdn'),
    tunnels?: [ 
      {
        bgpIp?: string(name='BgpIp'),
        cidrs?: [ string ](name='Cidrs'),
        gwIp?: string(name='GwIp'),
        psk?: string(name='Psk'),
        tuneId?: string(name='TuneId'),
      }
    ](name='Tunnels'),
  }(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model GetVtuneConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetVtuneConfigResponseBody(name='body'),
}

async function getVtuneConfigWithOptions(request: GetVtuneConfigRequest, runtime: Util.RuntimeOptions): GetVtuneConfigResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.epnId)) {
    body['EpnId'] = request.epnId;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetVtuneConfig',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getVtuneConfig(request: GetVtuneConfigRequest): GetVtuneConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVtuneConfigWithOptions(request, runtime);
}

model GetVtuneInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
  vtuneId?: string(name='VtuneId'),
}

model GetVtuneInstanceResponseBody = {
  code?: string(name='Code'),
  content?: {
    bgpIp?: string(name='BgpIp'),
    cidrInfo?: [ 
      {
        cidr?: string(name='Cidr'),
        priority?: int32(name='Priority'),
      }
    ](name='CidrInfo'),
    enableBgp?: boolean(name='EnableBgp'),
    limitRx?: long(name='LimitRx'),
    limitTx?: long(name='LimitTx'),
    priority?: int32(name='Priority'),
    vtuneId?: string(name='VtuneId'),
  }(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model GetVtuneInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetVtuneInstanceResponseBody(name='body'),
}

async function getVtuneInstanceWithOptions(request: GetVtuneInstanceRequest, runtime: Util.RuntimeOptions): GetVtuneInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  if (!Util.isUnset(request.vtuneId)) {
    body['VtuneId'] = request.vtuneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetVtuneInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getVtuneInstance(request: GetVtuneInstanceRequest): GetVtuneInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVtuneInstanceWithOptions(request, runtime);
}

model ListEBIRequest {
  akProxy?: string(name='AkProxy'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model ListEBIResponseBody = {
  code?: string(name='Code'),
  desc?: string(name='Desc'),
  model?: {
    content?: {
      data?: [ 
        {
          aliUid?: long(name='AliUid'),
          ebiId?: string(name='EbiId'),
          expInfo?: string(name='ExpInfo'),
          gateway?: string(name='Gateway'),
          ipInfo?: [ 
            {
              ip?: string(name='Ip'),
              vlan?: long(name='Vlan'),
            }
          ](name='IpInfo'),
          networkId?: string(name='NetworkId'),
          regionId?: string(name='RegionId'),
          status?: string(name='Status'),
        }
      ](name='Data'),
    }(name='Content'),
    description?: string(name='Description'),
    requestId?: string(name='RequestId'),
    retCode?: int32(name='RetCode'),
  }(name='Model'),
  queryCount?: int32(name='QueryCount'),
  request?: {
    isSync?: boolean(name='IsSync'),
    order?: {
      account?: {
        acctId?: long(name='AcctId'),
        acctName?: string(name='AcctName'),
        acctType?: string(name='AcctType'),
        billType?: int32(name='BillType'),
        controlType?: long(name='ControlType'),
        creditList?: [ 
          {
            accountId?: long(name='AccountId'),
            accountName?: string(name='AccountName'),
            creditBalance?: long(name='CreditBalance'),
            custId?: long(name='CustId'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            remarks?: string(name='Remarks'),
          }
        ](name='CreditList'),
        dataStatus?: int32(name='DataStatus'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        insStatus?: int32(name='InsStatus'),
        remarks?: string(name='Remarks'),
      }(name='Account'),
      assets?: {
        activeTime?: string(name='ActiveTime'),
        assetsId?: long(name='AssetsId'),
        assetsName?: string(name='AssetsName'),
        assetsOwner?: string(name='AssetsOwner'),
        assetsStatus?: int32(name='AssetsStatus'),
        assetsTag?: long(name='AssetsTag'),
        assetsType?: int32(name='AssetsType'),
        attributeList?: [ 
          {
            attrGroup?: string(name='AttrGroup'),
            attrId?: long(name='AttrId'),
            attrName?: string(name='AttrName'),
            attrText?: string(name='AttrText'),
            attrValue?: string(name='AttrValue'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            mappingCode?: string(name='MappingCode'),
            oldAttrText?: string(name='OldAttrText'),
            oldAttrValue?: string(name='OldAttrValue'),
            options?: long(name='Options'),
            remarks?: string(name='Remarks'),
            valueExpression?: string(name='ValueExpression'),
          }
        ](name='AttributeList'),
        billId?: string(name='BillId'),
        billSource?: string(name='BillSource'),
        channelId?: string(name='ChannelId'),
        dataStatus?: int32(name='DataStatus'),
        destroyTime?: string(name='DestroyTime'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        groupPath?: string(name='GroupPath'),
        imsi?: string(name='Imsi'),
        insStatus?: int32(name='InsStatus'),
        osStatus?: string(name='OsStatus'),
        osTime?: string(name='OsTime'),
        ownerAssetsId?: long(name='OwnerAssetsId'),
        password?: string(name='Password'),
        preDestroyTime?: string(name='PreDestroyTime'),
        productLineCode?: string(name='ProductLineCode'),
        realBillNumber?: string(name='RealBillNumber'),
        remarks?: string(name='Remarks'),
        resCode?: string(name='ResCode'),
      }(name='Assets'),
      busiOperation?: {
        operationCode?: string(name='OperationCode'),
        operationId?: long(name='OperationId'),
        operationName?: string(name='OperationName'),
      }(name='BusiOperation'),
      busiOperator?: string(name='BusiOperator'),
      busiPriceList?: [ 
        {
          alipayOrderNo?: string(name='AlipayOrderNo'),
          busiOperationId?: long(name='BusiOperationId'),
          busiPriceDetailList?: [ 
            {
              outerOrderNo?: string(name='OuterOrderNo'),
              paidAmount?: long(name='PaidAmount'),
              paymentMode?: string(name='PaymentMode'),
            }
          ](name='BusiPriceDetailList'),
          offerId?: long(name='OfferId'),
          orderChannel?: string(name='OrderChannel'),
          outerOrderNo?: string(name='OuterOrderNo'),
          paidAmount?: long(name='PaidAmount'),
          receivableAmount?: long(name='ReceivableAmount'),
          subjectId?: string(name='SubjectId'),
        }
      ](name='BusiPriceList'),
      channelId?: string(name='ChannelId'),
      customer?: {
        certAddress?: string(name='CertAddress'),
        certEffdate?: string(name='CertEffdate'),
        certExpire?: string(name='CertExpire'),
        certNo?: string(name='CertNo'),
        certType?: string(name='CertType'),
        contracts?: [ 
          {
            contactAddress?: string(name='ContactAddress'),
            contactName?: string(name='ContactName'),
            contactPhone?: string(name='ContactPhone'),
            contactType?: int32(name='ContactType'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            remarks?: string(name='Remarks'),
          }
        ](name='Contracts'),
        custId?: long(name='CustId'),
        custName?: string(name='CustName'),
        custTag?: long(name='CustTag'),
        custType?: string(name='CustType'),
        dataStatus?: int32(name='DataStatus'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gender?: int32(name='Gender'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        insStatus?: int32(name='InsStatus'),
        outerCustNo?: string(name='OuterCustNo'),
        remarks?: string(name='Remarks'),
        userBindType?: int32(name='UserBindType'),
        userId?: long(name='UserId'),
        userNick?: string(name='UserNick'),
      }(name='Customer'),
      dataStatus?: int32(name='DataStatus'),
      extInfo?: map[string]string(name='ExtInfo'),
      isAuth?: boolean(name='IsAuth'),
      offerList?: [ 
        {
          attributeList?: [ 
            {
              attrGroup?: string(name='AttrGroup'),
              attrId?: long(name='AttrId'),
              attrName?: string(name='AttrName'),
              attrText?: string(name='AttrText'),
              attrValue?: string(name='AttrValue'),
              dataStatus?: int32(name='DataStatus'),
              effectiveTime?: string(name='EffectiveTime'),
              expireTime?: string(name='ExpireTime'),
              gmtCreate?: string(name='GmtCreate'),
              gmtModified?: string(name='GmtModified'),
              insStatus?: int32(name='InsStatus'),
              mappingCode?: string(name='MappingCode'),
              oldAttrText?: string(name='OldAttrText'),
              oldAttrValue?: string(name='OldAttrValue'),
              options?: long(name='Options'),
              remarks?: string(name='Remarks'),
              valueExpression?: string(name='ValueExpression'),
            }
          ](name='AttributeList'),
          billingPkgId?: long(name='BillingPkgId'),
          dataStatus?: int32(name='DataStatus'),
          effParam?: string(name='EffParam'),
          effectiveTime?: string(name='EffectiveTime'),
          effectiveType?: string(name='EffectiveType'),
          expParam?: string(name='ExpParam'),
          expireTime?: string(name='ExpireTime'),
          expireType?: string(name='ExpireType'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insOfferId?: long(name='InsOfferId'),
          insStatus?: int32(name='InsStatus'),
          offerId?: long(name='OfferId'),
          offerName?: string(name='OfferName'),
          offerType?: string(name='OfferType'),
          oldEffectiveTime?: string(name='OldEffectiveTime'),
          oldInsOfferId?: long(name='OldInsOfferId'),
          oldOfferId?: long(name='OldOfferId'),
          operationId?: long(name='OperationId'),
          options?: long(name='Options'),
          ordType?: string(name='OrdType'),
          product?: {
            attributeList?: [ 
              {
                attrGroup?: string(name='AttrGroup'),
                attrId?: long(name='AttrId'),
                attrName?: string(name='AttrName'),
                attrText?: string(name='AttrText'),
                attrValue?: string(name='AttrValue'),
                dataStatus?: int32(name='DataStatus'),
                effectiveTime?: string(name='EffectiveTime'),
                expireTime?: string(name='ExpireTime'),
                gmtCreate?: string(name='GmtCreate'),
                gmtModified?: string(name='GmtModified'),
                insStatus?: int32(name='InsStatus'),
                mappingCode?: string(name='MappingCode'),
                oldAttrText?: string(name='OldAttrText'),
                oldAttrValue?: string(name='OldAttrValue'),
                options?: long(name='Options'),
                remarks?: string(name='Remarks'),
                valueExpression?: string(name='ValueExpression'),
              }
            ](name='AttributeList'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            effectiveType?: string(name='EffectiveType'),
            expireTime?: string(name='ExpireTime'),
            expireType?: string(name='ExpireType'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insProductId?: long(name='InsProductId'),
            insStatus?: int32(name='InsStatus'),
            isMain?: string(name='IsMain'),
            openStatus?: int32(name='OpenStatus'),
            operateTime?: string(name='OperateTime'),
            operationId?: long(name='OperationId'),
            options?: long(name='Options'),
            productId?: long(name='ProductId'),
            productName?: string(name='ProductName'),
            productType?: string(name='ProductType'),
            remarks?: string(name='Remarks'),
          }(name='Product'),
          remarks?: string(name='Remarks'),
        }
      ](name='OfferList'),
      openCompletedTime?: string(name='OpenCompletedTime'),
      orderId?: long(name='OrderId'),
      orderNo?: string(name='OrderNo'),
      orderSerialId?: long(name='OrderSerialId'),
      orderStatus?: string(name='OrderStatus'),
      orderTime?: string(name='OrderTime'),
      orderType?: string(name='OrderType'),
      ownerId?: string(name='OwnerId'),
      parentOrderId?: string(name='ParentOrderId'),
      productList?: [ 
        {
          attributeList?: [ 
            {
              attrGroup?: string(name='AttrGroup'),
              attrId?: long(name='AttrId'),
              attrName?: string(name='AttrName'),
              attrText?: string(name='AttrText'),
              attrValue?: string(name='AttrValue'),
              dataStatus?: int32(name='DataStatus'),
              effectiveTime?: string(name='EffectiveTime'),
              expireTime?: string(name='ExpireTime'),
              gmtCreate?: string(name='GmtCreate'),
              gmtModified?: string(name='GmtModified'),
              insStatus?: int32(name='InsStatus'),
              mappingCode?: string(name='MappingCode'),
              oldAttrText?: string(name='OldAttrText'),
              oldAttrValue?: string(name='OldAttrValue'),
              options?: long(name='Options'),
              remarks?: string(name='Remarks'),
              valueExpression?: string(name='ValueExpression'),
            }
          ](name='AttributeList'),
          dataStatus?: int32(name='DataStatus'),
          effectiveTime?: string(name='EffectiveTime'),
          effectiveType?: string(name='EffectiveType'),
          expireTime?: string(name='ExpireTime'),
          expireType?: string(name='ExpireType'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insProductId?: long(name='InsProductId'),
          insStatus?: int32(name='InsStatus'),
          isMain?: string(name='IsMain'),
          openStatus?: int32(name='OpenStatus'),
          operateTime?: string(name='OperateTime'),
          operationId?: long(name='OperationId'),
          options?: long(name='Options'),
          productId?: long(name='ProductId'),
          productName?: string(name='ProductName'),
          productType?: string(name='ProductType'),
          remarks?: string(name='Remarks'),
        }
      ](name='ProductList'),
      remarks?: string(name='Remarks'),
      ruleList?: [ 
        {
          actOnInsOfferId?: long(name='ActOnInsOfferId'),
          actOnOperationId?: long(name='ActOnOperationId'),
          actOnUserId?: long(name='ActOnUserId'),
          dataStatus?: int32(name='DataStatus'),
          effectiveTime?: string(name='EffectiveTime'),
          expireTime?: string(name='ExpireTime'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insStatus?: int32(name='InsStatus'),
          message?: string(name='Message'),
          remarks?: string(name='Remarks'),
          resultCode?: string(name='ResultCode'),
          ruleCode?: string(name='RuleCode'),
          ruleId?: string(name='RuleId'),
          ruleName?: string(name='RuleName'),
          ruleStatus?: string(name='RuleStatus'),
          triggerInsOfferId?: long(name='TriggerInsOfferId'),
        }
      ](name='RuleList'),
    }(name='Order'),
    serialNo?: string(name='SerialNo'),
  }(name='Request'),
  success?: boolean(name='Success'),
}

model ListEBIResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListEBIResponseBody(name='body'),
}

async function listEBIWithOptions(request: ListEBIRequest, runtime: Util.RuntimeOptions): ListEBIResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListEBI',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listEBI(request: ListEBIRequest): ListEBIResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEBIWithOptions(request, runtime);
}

model OpenApiTestRequest {
  id?: string(name='Id'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model OpenApiTestResponseBody = {
  code?: string(name='Code'),
  desc?: string(name='Desc'),
  model?: boolean(name='Model'),
  success?: boolean(name='Success'),
}

model OpenApiTestResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: OpenApiTestResponseBody(name='body'),
}

async function openApiTestWithOptions(request: OpenApiTestRequest, runtime: Util.RuntimeOptions): OpenApiTestResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.prodCode)) {
    query['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'OpenApiTest',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function openApiTest(request: OpenApiTestRequest): OpenApiTestResponse {
  var runtime = new Util.RuntimeOptions{};
  return openApiTestWithOptions(request, runtime);
}

model QueryAccelerateSellerShopRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryAccelerateSellerShopResponseBody = {
  requestId?: string(name='RequestId'),
  code?: string(name='code'),
  data?: string(name='data'),
}

model QueryAccelerateSellerShopResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryAccelerateSellerShopResponseBody(name='body'),
}

async function queryAccelerateSellerShopWithOptions(request: QueryAccelerateSellerShopRequest, runtime: Util.RuntimeOptions): QueryAccelerateSellerShopResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.prodCode)) {
    query['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAccelerateSellerShop',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryAccelerateSellerShop(request: QueryAccelerateSellerShopRequest): QueryAccelerateSellerShopResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAccelerateSellerShopWithOptions(request, runtime);
}

model QueryAccelerateStatisticsRequest {
  endDate?: string(name='EndDate'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  prodId?: int32(name='ProdId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  startDate?: string(name='StartDate'),
}

model QueryAccelerateStatisticsResponseBody = {
  requestId?: string(name='RequestId'),
  code?: string(name='code'),
  data?: string(name='data'),
}

model QueryAccelerateStatisticsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryAccelerateStatisticsResponseBody(name='body'),
}

async function queryAccelerateStatisticsWithOptions(request: QueryAccelerateStatisticsRequest, runtime: Util.RuntimeOptions): QueryAccelerateStatisticsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.prodCode)) {
    query['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.prodId)) {
    query['ProdId'] = request.prodId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAccelerateStatistics',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryAccelerateStatistics(request: QueryAccelerateStatisticsRequest): QueryAccelerateStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAccelerateStatisticsWithOptions(request, runtime);
}

model QueryEBIRequest {
  akProxy?: string(name='AkProxy'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  ebiId?: string(name='Ebi_id'),
  enable?: boolean(name='Enable'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model QueryEBIResponseBody = {
  code?: string(name='Code'),
  desc?: string(name='Desc'),
  model?: {
    content?: {
      aliuid?: long(name='Aliuid'),
      ebiId?: string(name='Ebi_id'),
      expInfo?: string(name='Exp_info'),
      gateway?: string(name='Gateway'),
      ipInfo?: [ 
        {
          ip?: string(name='Ip'),
          vlan?: long(name='Vlan'),
        }
      ](name='Ip_info'),
      networkId?: string(name='Network_id'),
      regionId?: string(name='Region_id'),
      status?: string(name='Status'),
    }(name='Content'),
    description?: string(name='Description'),
    requestId?: string(name='RequestId'),
    retCode?: int32(name='RetCode'),
  }(name='Model'),
  queryCount?: int32(name='QueryCount'),
  request?: {
    isSync?: boolean(name='IsSync'),
    order?: {
      account?: {
        acctId?: long(name='AcctId'),
        acctName?: string(name='AcctName'),
        acctType?: string(name='AcctType'),
        billType?: int32(name='BillType'),
        controlType?: long(name='ControlType'),
        creditList?: [ 
          {
            accountId?: long(name='AccountId'),
            accountName?: string(name='AccountName'),
            creditBalance?: long(name='CreditBalance'),
            custId?: long(name='CustId'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            remarks?: string(name='Remarks'),
          }
        ](name='CreditList'),
        dataStatus?: int32(name='DataStatus'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        insStatus?: int32(name='InsStatus'),
        remarks?: string(name='Remarks'),
      }(name='Account'),
      assets?: {
        activeTime?: string(name='ActiveTime'),
        assetsId?: long(name='AssetsId'),
        assetsName?: string(name='AssetsName'),
        assetsOwner?: string(name='AssetsOwner'),
        assetsStatus?: int32(name='AssetsStatus'),
        assetsTag?: long(name='AssetsTag'),
        assetsType?: int32(name='AssetsType'),
        attributeList?: [ 
          {
            attrGroup?: string(name='AttrGroup'),
            attrId?: long(name='AttrId'),
            attrName?: string(name='AttrName'),
            attrText?: string(name='AttrText'),
            attrValue?: string(name='AttrValue'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            mappingCode?: string(name='MappingCode'),
            oldAttrText?: string(name='OldAttrText'),
            oldAttrValue?: string(name='OldAttrValue'),
            options?: long(name='Options'),
            remarks?: string(name='Remarks'),
            valueExpression?: string(name='ValueExpression'),
          }
        ](name='AttributeList'),
        billId?: string(name='BillId'),
        billSource?: string(name='BillSource'),
        channelId?: string(name='ChannelId'),
        dataStatus?: int32(name='DataStatus'),
        destroyTime?: string(name='DestroyTime'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        groupPath?: string(name='GroupPath'),
        imsi?: string(name='Imsi'),
        insStatus?: int32(name='InsStatus'),
        osStatus?: string(name='OsStatus'),
        osTime?: string(name='OsTime'),
        ownerAssetsId?: long(name='OwnerAssetsId'),
        password?: string(name='Password'),
        preDestroyTime?: string(name='PreDestroyTime'),
        productLineCode?: string(name='ProductLineCode'),
        realBillNumber?: string(name='RealBillNumber'),
        remarks?: string(name='Remarks'),
        resCode?: string(name='ResCode'),
      }(name='Assets'),
      busiOperation?: {
        operationCode?: string(name='OperationCode'),
        operationId?: long(name='OperationId'),
        operationName?: string(name='OperationName'),
      }(name='BusiOperation'),
      busiOperator?: string(name='BusiOperator'),
      busiPriceList?: [ 
        {
          alipayOrderNo?: string(name='AlipayOrderNo'),
          busiOperationId?: long(name='BusiOperationId'),
          busiPriceDetailList?: [ 
            {
              outerOrderNo?: string(name='OuterOrderNo'),
              paidAmount?: long(name='PaidAmount'),
              paymentMode?: string(name='PaymentMode'),
            }
          ](name='BusiPriceDetailList'),
          offerId?: long(name='OfferId'),
          orderChannel?: string(name='OrderChannel'),
          outerOrderNo?: string(name='OuterOrderNo'),
          paidAmount?: long(name='PaidAmount'),
          receivableAmount?: long(name='ReceivableAmount'),
          subjectId?: string(name='SubjectId'),
        }
      ](name='BusiPriceList'),
      channelId?: string(name='ChannelId'),
      customer?: {
        certAddress?: string(name='CertAddress'),
        certEffdate?: string(name='CertEffdate'),
        certExpire?: string(name='CertExpire'),
        certNo?: string(name='CertNo'),
        certType?: string(name='CertType'),
        contracts?: [ 
          {
            contactAddress?: string(name='ContactAddress'),
            contactName?: string(name='ContactName'),
            contactPhone?: string(name='ContactPhone'),
            contactType?: int32(name='ContactType'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            expireTime?: string(name='ExpireTime'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insStatus?: int32(name='InsStatus'),
            remarks?: string(name='Remarks'),
          }
        ](name='Contracts'),
        custId?: long(name='CustId'),
        custName?: string(name='CustName'),
        custTag?: long(name='CustTag'),
        custType?: string(name='CustType'),
        dataStatus?: int32(name='DataStatus'),
        effectiveTime?: string(name='EffectiveTime'),
        expireTime?: string(name='ExpireTime'),
        gender?: int32(name='Gender'),
        gmtCreate?: string(name='GmtCreate'),
        gmtModified?: string(name='GmtModified'),
        insStatus?: int32(name='InsStatus'),
        outerCustNo?: string(name='OuterCustNo'),
        remarks?: string(name='Remarks'),
        userBindType?: int32(name='UserBindType'),
        userId?: long(name='UserId'),
        userNick?: string(name='UserNick'),
      }(name='Customer'),
      dataStatus?: int32(name='DataStatus'),
      extInfo?: map[string]string(name='ExtInfo'),
      isAuth?: boolean(name='IsAuth'),
      offerList?: [ 
        {
          attributeList?: [ 
            {
              attrGroup?: string(name='AttrGroup'),
              attrId?: long(name='AttrId'),
              attrName?: string(name='AttrName'),
              attrText?: string(name='AttrText'),
              attrValue?: string(name='AttrValue'),
              dataStatus?: int32(name='DataStatus'),
              effectiveTime?: string(name='EffectiveTime'),
              expireTime?: string(name='ExpireTime'),
              gmtCreate?: string(name='GmtCreate'),
              gmtModified?: string(name='GmtModified'),
              insStatus?: int32(name='InsStatus'),
              mappingCode?: string(name='MappingCode'),
              oldAttrText?: string(name='OldAttrText'),
              oldAttrValue?: string(name='OldAttrValue'),
              options?: long(name='Options'),
              remarks?: string(name='Remarks'),
              valueExpression?: string(name='ValueExpression'),
            }
          ](name='AttributeList'),
          billingPkgId?: long(name='BillingPkgId'),
          dataStatus?: int32(name='DataStatus'),
          effParam?: string(name='EffParam'),
          effectiveTime?: string(name='EffectiveTime'),
          effectiveType?: string(name='EffectiveType'),
          expParam?: string(name='ExpParam'),
          expireTime?: string(name='ExpireTime'),
          expireType?: string(name='ExpireType'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insOfferId?: long(name='InsOfferId'),
          insStatus?: int32(name='InsStatus'),
          offerId?: long(name='OfferId'),
          offerName?: string(name='OfferName'),
          offerType?: string(name='OfferType'),
          oldEffectiveTime?: string(name='OldEffectiveTime'),
          oldInsOfferId?: long(name='OldInsOfferId'),
          oldOfferId?: long(name='OldOfferId'),
          operationId?: long(name='OperationId'),
          options?: long(name='Options'),
          ordType?: string(name='OrdType'),
          product?: {
            attributeList?: [ 
              {
                attrGroup?: string(name='AttrGroup'),
                attrId?: long(name='AttrId'),
                attrName?: string(name='AttrName'),
                attrText?: string(name='AttrText'),
                attrValue?: string(name='AttrValue'),
                dataStatus?: int32(name='DataStatus'),
                effectiveTime?: string(name='EffectiveTime'),
                expireTime?: string(name='ExpireTime'),
                gmtCreate?: string(name='GmtCreate'),
                gmtModified?: string(name='GmtModified'),
                insStatus?: int32(name='InsStatus'),
                mappingCode?: string(name='MappingCode'),
                oldAttrText?: string(name='OldAttrText'),
                oldAttrValue?: string(name='OldAttrValue'),
                options?: long(name='Options'),
                remarks?: string(name='Remarks'),
                valueExpression?: string(name='ValueExpression'),
              }
            ](name='AttributeList'),
            dataStatus?: int32(name='DataStatus'),
            effectiveTime?: string(name='EffectiveTime'),
            effectiveType?: string(name='EffectiveType'),
            expireTime?: string(name='ExpireTime'),
            expireType?: string(name='ExpireType'),
            gmtCreate?: string(name='GmtCreate'),
            gmtModified?: string(name='GmtModified'),
            insProductId?: long(name='InsProductId'),
            insStatus?: int32(name='InsStatus'),
            isMain?: string(name='IsMain'),
            openStatus?: int32(name='OpenStatus'),
            operateTime?: string(name='OperateTime'),
            operationId?: long(name='OperationId'),
            options?: long(name='Options'),
            productId?: long(name='ProductId'),
            productName?: string(name='ProductName'),
            productType?: string(name='ProductType'),
            remarks?: string(name='Remarks'),
          }(name='Product'),
          remarks?: string(name='Remarks'),
        }
      ](name='OfferList'),
      openCompletedTime?: string(name='OpenCompletedTime'),
      orderId?: long(name='OrderId'),
      orderNo?: string(name='OrderNo'),
      orderSerialId?: long(name='OrderSerialId'),
      orderStatus?: string(name='OrderStatus'),
      orderTime?: string(name='OrderTime'),
      orderType?: string(name='OrderType'),
      ownerId?: string(name='OwnerId'),
      parentOrderId?: string(name='ParentOrderId'),
      productList?: [ 
        {
          attributeList?: [ 
            {
              attrGroup?: string(name='AttrGroup'),
              attrId?: long(name='AttrId'),
              attrName?: string(name='AttrName'),
              attrText?: string(name='AttrText'),
              attrValue?: string(name='AttrValue'),
              dataStatus?: int32(name='DataStatus'),
              effectiveTime?: string(name='EffectiveTime'),
              expireTime?: string(name='ExpireTime'),
              gmtCreate?: string(name='GmtCreate'),
              gmtModified?: string(name='GmtModified'),
              insStatus?: int32(name='InsStatus'),
              mappingCode?: string(name='MappingCode'),
              oldAttrText?: string(name='OldAttrText'),
              oldAttrValue?: string(name='OldAttrValue'),
              options?: long(name='Options'),
              remarks?: string(name='Remarks'),
              valueExpression?: string(name='ValueExpression'),
            }
          ](name='AttributeList'),
          dataStatus?: int32(name='DataStatus'),
          effectiveTime?: string(name='EffectiveTime'),
          effectiveType?: string(name='EffectiveType'),
          expireTime?: string(name='ExpireTime'),
          expireType?: string(name='ExpireType'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insProductId?: long(name='InsProductId'),
          insStatus?: int32(name='InsStatus'),
          isMain?: string(name='IsMain'),
          openStatus?: int32(name='OpenStatus'),
          operateTime?: string(name='OperateTime'),
          operationId?: long(name='OperationId'),
          options?: long(name='Options'),
          productId?: long(name='ProductId'),
          productName?: string(name='ProductName'),
          productType?: string(name='ProductType'),
          remarks?: string(name='Remarks'),
        }
      ](name='ProductList'),
      remarks?: string(name='Remarks'),
      ruleList?: [ 
        {
          actOnInsOfferId?: long(name='ActOnInsOfferId'),
          actOnOperationId?: long(name='ActOnOperationId'),
          actOnUserId?: long(name='ActOnUserId'),
          dataStatus?: int32(name='DataStatus'),
          effectiveTime?: string(name='EffectiveTime'),
          expireTime?: string(name='ExpireTime'),
          gmtCreate?: string(name='GmtCreate'),
          gmtModified?: string(name='GmtModified'),
          insStatus?: int32(name='InsStatus'),
          message?: string(name='Message'),
          remarks?: string(name='Remarks'),
          resultCode?: string(name='ResultCode'),
          ruleCode?: string(name='RuleCode'),
          ruleId?: string(name='RuleId'),
          ruleName?: string(name='RuleName'),
          ruleStatus?: string(name='RuleStatus'),
          triggerInsOfferId?: long(name='TriggerInsOfferId'),
        }
      ](name='RuleList'),
    }(name='Order'),
    serialNo?: string(name='SerialNo'),
  }(name='Request'),
  success?: boolean(name='Success'),
}

model QueryEBIResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryEBIResponseBody(name='body'),
}

async function queryEBIWithOptions(request: QueryEBIRequest, runtime: Util.RuntimeOptions): QueryEBIResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.ebiId)) {
    body['Ebi_id'] = request.ebiId;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryEBI',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryEBI(request: QueryEBIRequest): QueryEBIResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryEBIWithOptions(request, runtime);
}

model QueryEntPrivateNetAddressesRequest {
  ownerId?: long(name='OwnerId'),
  pageNo?: int32(name='PageNo'),
  pageSize?: int32(name='PageSize'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryEntPrivateNetAddressesResponseBody = {
  requestId?: string(name='RequestId'),
  resultMessage?: string(name='ResultMessage'),
  success?: string(name='Success'),
  code?: string(name='code'),
  data?: {
    pageNo?: int32(name='PageNo'),
    pageSize?: int32(name='PageSize'),
    total?: int32(name='Total'),
    userAddressDOList?: [ 
      {
        accessType?: string(name='AccessType'),
        addrId?: long(name='AddrId'),
        address?: string(name='Address'),
        area?: string(name='Area'),
        bandWidth?: string(name='BandWidth'),
        extraFee?: string(name='ExtraFee'),
        initFee?: string(name='InitFee'),
      }
    ](name='UserAddressDOList'),
  }(name='data'),
}

model QueryEntPrivateNetAddressesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryEntPrivateNetAddressesResponseBody(name='body'),
}

async function queryEntPrivateNetAddressesWithOptions(request: QueryEntPrivateNetAddressesRequest, runtime: Util.RuntimeOptions): QueryEntPrivateNetAddressesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNo)) {
    query['PageNo'] = request.pageNo;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryEntPrivateNetAddresses',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryEntPrivateNetAddresses(request: QueryEntPrivateNetAddressesRequest): QueryEntPrivateNetAddressesResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryEntPrivateNetAddressesWithOptions(request, runtime);
}

model QueryEntPrivateNetOrdersRequest {
  filterAddress?: string(name='FilterAddress'),
  filterIntentionId?: long(name='FilterIntentionId'),
  filterStatus?: string(name='FilterStatus'),
  ownerId?: long(name='OwnerId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryEntPrivateNetOrdersResponseBody = {
  requestId?: string(name='RequestId'),
  resultMessage?: string(name='ResultMessage'),
  success?: string(name='Success'),
  code?: string(name='code'),
  data?: {
    orderDetailList?: [ 
      {
        address?: string(name='Address'),
        addressId?: string(name='AddressId'),
        aliyunIp?: string(name='AliyunIp'),
        bandWidth?: string(name='BandWidth'),
        buyCycle?: string(name='BuyCycle'),
        contactEmail?: string(name='ContactEmail'),
        custName?: string(name='CustName'),
        effectiveDateStr?: string(name='EffectiveDateStr'),
        expiresDateStr?: string(name='ExpiresDateStr'),
        failDateStr?: string(name='FailDateStr'),
        failReason?: string(name='FailReason'),
        gmtCreateStr?: string(name='GmtCreateStr'),
        installRegion?: string(name='InstallRegion'),
        installationFee?: string(name='InstallationFee'),
        natIp?: string(name='NatIp'),
        orderId?: long(name='OrderId'),
        phoneNumber?: string(name='PhoneNumber'),
        refundDateStr?: string(name='RefundDateStr'),
        status?: string(name='Status'),
        wttOrdBizId?: string(name='WttOrdBizId'),
      }
    ](name='OrderDetailList'),
    pageNo?: int32(name='PageNo'),
    pageSize?: int32(name='PageSize'),
    total?: int32(name='Total'),
  }(name='data'),
}

model QueryEntPrivateNetOrdersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryEntPrivateNetOrdersResponseBody(name='body'),
}

async function queryEntPrivateNetOrdersWithOptions(request: QueryEntPrivateNetOrdersRequest, runtime: Util.RuntimeOptions): QueryEntPrivateNetOrdersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.filterAddress)) {
    query['FilterAddress'] = request.filterAddress;
  }
  if (!Util.isUnset(request.filterIntentionId)) {
    query['FilterIntentionId'] = request.filterIntentionId;
  }
  if (!Util.isUnset(request.filterStatus)) {
    query['FilterStatus'] = request.filterStatus;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryEntPrivateNetOrders',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryEntPrivateNetOrders(request: QueryEntPrivateNetOrdersRequest): QueryEntPrivateNetOrdersResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryEntPrivateNetOrdersWithOptions(request, runtime);
}

model QueryEpnInstancesRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  epnId?: string(name='EpnId'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  page?: int32(name='Page'),
  pageSize?: int32(name='PageSize'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model QueryEpnInstancesResponseBody = {
  code?: string(name='Code'),
  content?: {
    data?: [ 
      {
        accelerate?: boolean(name='Accelerate'),
        aliuid?: long(name='Aliuid'),
        dscp?: int32(name='Dscp'),
        endTime?: string(name='EndTime'),
        epnId?: string(name='EpnId'),
        epnName?: string(name='EpnName'),
        limitRx?: int32(name='LimitRx'),
        limitTx?: int32(name='LimitTx'),
        security?: boolean(name='Security'),
        startTime?: string(name='StartTime'),
        status?: int32(name='Status'),
      }
    ](name='Data'),
    page?: int32(name='Page'),
    pageSize?: int32(name='PageSize'),
    pages?: int32(name='Pages'),
    totalCount?: int32(name='TotalCount'),
  }(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model QueryEpnInstancesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryEpnInstancesResponseBody(name='body'),
}

async function queryEpnInstancesWithOptions(request: QueryEpnInstancesRequest, runtime: Util.RuntimeOptions): QueryEpnInstancesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.epnId)) {
    body['EpnId'] = request.epnId;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.page)) {
    body['Page'] = request.page;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryEpnInstances',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryEpnInstances(request: QueryEpnInstancesRequest): QueryEpnInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryEpnInstancesWithOptions(request, runtime);
}

model QueryEvgwInstancesRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  evgwId?: string(name='EvgwId'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  page?: int32(name='Page'),
  pageSize?: int32(name='PageSize'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model QueryEvgwInstancesResponseBody = {
  code?: string(name='Code'),
  content?: {
    data?: [ 
      {
        aliUid?: long(name='AliUid'),
        evgwId?: string(name='EvgwId'),
        evgwName?: string(name='EvgwName'),
        ipsecPsk?: string(name='IpsecPsk'),
        regionId?: string(name='RegionId'),
        status?: int32(name='Status'),
      }
    ](name='Data'),
    page?: int32(name='Page'),
    pageSize?: int32(name='PageSize'),
    pages?: int32(name='Pages'),
    totalCount?: int32(name='TotalCount'),
  }(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model QueryEvgwInstancesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryEvgwInstancesResponseBody(name='body'),
}

async function queryEvgwInstancesWithOptions(request: QueryEvgwInstancesRequest, runtime: Util.RuntimeOptions): QueryEvgwInstancesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.evgwId)) {
    body['EvgwId'] = request.evgwId;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.page)) {
    body['Page'] = request.page;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryEvgwInstances',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryEvgwInstances(request: QueryEvgwInstancesRequest): QueryEvgwInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryEvgwInstancesWithOptions(request, runtime);
}

model QueryOpenStatusRequest {
  busOffer?: long(name='BusOffer'),
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  prodId?: string(name='ProdId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryOpenStatusResponseBody = {
  requestId?: string(name='RequestId'),
  code?: string(name='code'),
  data?: boolean(name='data'),
}

model QueryOpenStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryOpenStatusResponseBody(name='body'),
}

async function queryOpenStatusWithOptions(request: QueryOpenStatusRequest, runtime: Util.RuntimeOptions): QueryOpenStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.busOffer)) {
    query['BusOffer'] = request.busOffer;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.prodCode)) {
    query['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.prodId)) {
    query['ProdId'] = request.prodId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryOpenStatus',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryOpenStatus(request: QueryOpenStatusRequest): QueryOpenStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOpenStatusWithOptions(request, runtime);
}

model QueryTestPeriodDetailRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
}

model QueryTestPeriodDetailResponseBody = {
  requestId?: string(name='RequestId'),
  code?: string(name='code'),
  data?: string(name='data'),
}

model QueryTestPeriodDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryTestPeriodDetailResponseBody(name='body'),
}

async function queryTestPeriodDetailWithOptions(request: QueryTestPeriodDetailRequest, runtime: Util.RuntimeOptions): QueryTestPeriodDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.prodCode)) {
    query['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryTestPeriodDetail',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryTestPeriodDetail(request: QueryTestPeriodDetailRequest): QueryTestPeriodDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryTestPeriodDetailWithOptions(request, runtime);
}

model QueryVtuneInstancesRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  page?: int32(name='Page'),
  pageSize?: int32(name='PageSize'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
  vtuneId?: string(name='VtuneId'),
}

model QueryVtuneInstancesResponseBody = {
  code?: string(name='Code'),
  content?: {
    data?: [ 
      {
        aliUid?: long(name='AliUid'),
        cpeId?: string(name='CpeId'),
        dhcp?: boolean(name='Dhcp'),
        enableBgp?: boolean(name='EnableBgp'),
        limitRx?: long(name='LimitRx'),
        limitTx?: long(name='LimitTx'),
        partner?: string(name='Partner'),
        priority?: int32(name='Priority'),
        ptUuid?: string(name='PtUuid'),
        status?: int32(name='Status'),
        vtuneId?: string(name='VtuneId'),
      }
    ](name='Data'),
    page?: int32(name='Page'),
    pageSize?: int32(name='PageSize'),
    pages?: int32(name='Pages'),
    totalCount?: int32(name='TotalCount'),
  }(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model QueryVtuneInstancesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryVtuneInstancesResponseBody(name='body'),
}

async function queryVtuneInstancesWithOptions(request: QueryVtuneInstancesRequest, runtime: Util.RuntimeOptions): QueryVtuneInstancesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.page)) {
    body['Page'] = request.page;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  if (!Util.isUnset(request.vtuneId)) {
    body['VtuneId'] = request.vtuneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryVtuneInstances',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryVtuneInstances(request: QueryVtuneInstancesRequest): QueryVtuneInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryVtuneInstancesWithOptions(request, runtime);
}

model ResumeEpnInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  epnId?: string(name='EpnId'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model ResumeEpnInstanceResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model ResumeEpnInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ResumeEpnInstanceResponseBody(name='body'),
}

async function resumeEpnInstanceWithOptions(request: ResumeEpnInstanceRequest, runtime: Util.RuntimeOptions): ResumeEpnInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.epnId)) {
    body['EpnId'] = request.epnId;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ResumeEpnInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function resumeEpnInstance(request: ResumeEpnInstanceRequest): ResumeEpnInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return resumeEpnInstanceWithOptions(request, runtime);
}

model StopEpnInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  epnId?: string(name='EpnId'),
  fromType?: int32(name='FromType'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model StopEpnInstanceResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model StopEpnInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StopEpnInstanceResponseBody(name='body'),
}

async function stopEpnInstanceWithOptions(request: StopEpnInstanceRequest, runtime: Util.RuntimeOptions): StopEpnInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.epnId)) {
    body['EpnId'] = request.epnId;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'StopEpnInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function stopEpnInstance(request: StopEpnInstanceRequest): StopEpnInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopEpnInstanceWithOptions(request, runtime);
}

model UpdateEpnInstanceRequest {
  accelerate?: boolean(name='Accelerate'),
  akProxy?: string(name='AkProxy'),
  aliuid?: long(name='Aliuid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  dscp?: int32(name='Dscp'),
  enable?: boolean(name='Enable'),
  epnId?: string(name='EpnId'),
  epnName?: string(name='EpnName'),
  fromType?: int32(name='FromType'),
  limitRx?: int32(name='LimitRx'),
  limitTx?: int32(name='LimitTx'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  security?: boolean(name='Security'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  status?: int32(name='Status'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model UpdateEpnInstanceResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model UpdateEpnInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateEpnInstanceResponseBody(name='body'),
}

async function updateEpnInstanceWithOptions(request: UpdateEpnInstanceRequest, runtime: Util.RuntimeOptions): UpdateEpnInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accelerate)) {
    body['Accelerate'] = request.accelerate;
  }
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliuid)) {
    body['Aliuid'] = request.aliuid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.dscp)) {
    body['Dscp'] = request.dscp;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.epnId)) {
    body['EpnId'] = request.epnId;
  }
  if (!Util.isUnset(request.epnName)) {
    body['EpnName'] = request.epnName;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.limitRx)) {
    body['LimitRx'] = request.limitRx;
  }
  if (!Util.isUnset(request.limitTx)) {
    body['LimitTx'] = request.limitTx;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.security)) {
    body['Security'] = request.security;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateEpnInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateEpnInstance(request: UpdateEpnInstanceRequest): UpdateEpnInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateEpnInstanceWithOptions(request, runtime);
}

model UpdateEvgwInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  evgwId?: string(name='EvgwId'),
  fromType?: int32(name='FromType'),
  ipsecPsk?: string(name='IpsecPsk'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
}

model UpdateEvgwInstanceResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model UpdateEvgwInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateEvgwInstanceResponseBody(name='body'),
}

async function updateEvgwInstanceWithOptions(request: UpdateEvgwInstanceRequest, runtime: Util.RuntimeOptions): UpdateEvgwInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.evgwId)) {
    body['EvgwId'] = request.evgwId;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.ipsecPsk)) {
    body['IpsecPsk'] = request.ipsecPsk;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateEvgwInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateEvgwInstance(request: UpdateEvgwInstanceRequest): UpdateEvgwInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateEvgwInstanceWithOptions(request, runtime);
}

model UpdateVtuneInstanceRequest {
  akProxy?: string(name='AkProxy'),
  aliUid?: long(name='AliUid'),
  apiName?: string(name='ApiName'),
  appKey?: string(name='AppKey'),
  callerBid?: string(name='CallerBid'),
  callerBidLoginEmail?: string(name='CallerBidLoginEmail'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport'),
  callerType?: string(name='CallerType'),
  callerUid?: long(name='CallerUid'),
  callerUidLoginEmail?: string(name='CallerUidLoginEmail'),
  channel?: string(name='Channel'),
  clientIP?: string(name='ClientIP'),
  enable?: boolean(name='Enable'),
  enableBgp?: boolean(name='EnableBgp'),
  fromType?: int32(name='FromType'),
  limitRx?: long(name='LimitRx'),
  limitTx?: long(name='LimitTx'),
  mfaPresent?: boolean(name='MfaPresent'),
  operator?: string(name='Operator'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  ownerIdLoginEmail?: string(name='OwnerIdLoginEmail'),
  priority?: int32(name='Priority'),
  prodCode?: string(name='ProdCode'),
  proxyCallerIp?: string(name='ProxyCallerIp'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport'),
  proxyId?: string(name='ProxyId'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo'),
  requestContent?: string(name='RequestContent'),
  requestId?: string(name='RequestId'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  securityToken?: string(name='SecurityToken'),
  smsResourceOwnerId?: long(name='SmsResourceOwnerId'),
  tagKey1?: string(name='TagKey1'),
  tagKey2?: string(name='TagKey2'),
  tagKey3?: string(name='TagKey3'),
  tagKey4?: string(name='TagKey4'),
  tagKey5?: string(name='TagKey5'),
  tagKeyValueModels?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='TagKeyValueModels'),
  tagValue1?: string(name='TagValue1'),
  tagValue2?: string(name='TagValue2'),
  tagValue3?: string(name='TagValue3'),
  tagValue4?: string(name='TagValue4'),
  tagValue5?: string(name='TagValue5'),
  token?: string(name='Token'),
  version?: string(name='Version'),
  vtuneId?: string(name='VtuneId'),
}

model UpdateVtuneInstanceResponseBody = {
  code?: string(name='Code'),
  content?: any(name='Content'),
  desc?: string(name='Desc'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  retCode?: int32(name='RetCode'),
  success?: boolean(name='Success'),
}

model UpdateVtuneInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateVtuneInstanceResponseBody(name='body'),
}

async function updateVtuneInstanceWithOptions(request: UpdateVtuneInstanceRequest, runtime: Util.RuntimeOptions): UpdateVtuneInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.akProxy)) {
    body['AkProxy'] = request.akProxy;
  }
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.apiName)) {
    body['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.callerBid)) {
    body['CallerBid'] = request.callerBid;
  }
  if (!Util.isUnset(request.callerBidLoginEmail)) {
    body['CallerBidLoginEmail'] = request.callerBidLoginEmail;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    body['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.callerUid)) {
    body['CallerUid'] = request.callerUid;
  }
  if (!Util.isUnset(request.callerUidLoginEmail)) {
    body['CallerUidLoginEmail'] = request.callerUidLoginEmail;
  }
  if (!Util.isUnset(request.channel)) {
    body['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.clientIP)) {
    body['ClientIP'] = request.clientIP;
  }
  if (!Util.isUnset(request.enable)) {
    body['Enable'] = request.enable;
  }
  if (!Util.isUnset(request.enableBgp)) {
    body['EnableBgp'] = request.enableBgp;
  }
  if (!Util.isUnset(request.fromType)) {
    body['FromType'] = request.fromType;
  }
  if (!Util.isUnset(request.limitRx)) {
    body['LimitRx'] = request.limitRx;
  }
  if (!Util.isUnset(request.limitTx)) {
    body['LimitTx'] = request.limitTx;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    body['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.operator)) {
    body['Operator'] = request.operator;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    body['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ownerIdLoginEmail)) {
    body['OwnerIdLoginEmail'] = request.ownerIdLoginEmail;
  }
  if (!Util.isUnset(request.priority)) {
    body['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.prodCode)) {
    body['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    body['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    body['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyId)) {
    body['ProxyId'] = request.proxyId;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    body['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestContent)) {
    body['RequestContent'] = request.requestContent;
  }
  if (!Util.isUnset(request.requestId)) {
    body['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    body['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    body['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    body['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.smsResourceOwnerId)) {
    body['SmsResourceOwnerId'] = request.smsResourceOwnerId;
  }
  if (!Util.isUnset(request.tagKey1)) {
    body['TagKey1'] = request.tagKey1;
  }
  if (!Util.isUnset(request.tagKey2)) {
    body['TagKey2'] = request.tagKey2;
  }
  if (!Util.isUnset(request.tagKey3)) {
    body['TagKey3'] = request.tagKey3;
  }
  if (!Util.isUnset(request.tagKey4)) {
    body['TagKey4'] = request.tagKey4;
  }
  if (!Util.isUnset(request.tagKey5)) {
    body['TagKey5'] = request.tagKey5;
  }
  if (!Util.isUnset(request.tagKeyValueModels)) {
    body['TagKeyValueModels'] = request.tagKeyValueModels;
  }
  if (!Util.isUnset(request.tagValue1)) {
    body['TagValue1'] = request.tagValue1;
  }
  if (!Util.isUnset(request.tagValue2)) {
    body['TagValue2'] = request.tagValue2;
  }
  if (!Util.isUnset(request.tagValue3)) {
    body['TagValue3'] = request.tagValue3;
  }
  if (!Util.isUnset(request.tagValue4)) {
    body['TagValue4'] = request.tagValue4;
  }
  if (!Util.isUnset(request.tagValue5)) {
    body['TagValue5'] = request.tagValue5;
  }
  if (!Util.isUnset(request.token)) {
    body['Token'] = request.token;
  }
  if (!Util.isUnset(request.version)) {
    body['Version'] = request.version;
  }
  if (!Util.isUnset(request.vtuneId)) {
    body['VtuneId'] = request.vtuneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateVtuneInstance',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateVtuneInstance(request: UpdateVtuneInstanceRequest): UpdateVtuneInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateVtuneInstanceWithOptions(request, runtime);
}

model ValidatYunSnsuBuyRequest {
  ownerId?: long(name='OwnerId'),
  prodCode?: string(name='ProdCode'),
  resourceOwnerAccount?: string(name='ResourceOwnerAccount'),
  resourceOwnerId?: long(name='ResourceOwnerId'),
  data?: string(name='data'),
}

model ValidatYunSnsuBuyResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
}

model ValidatYunSnsuBuyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ValidatYunSnsuBuyResponseBody(name='body'),
}

async function validatYunSnsuBuyWithOptions(request: ValidatYunSnsuBuyRequest, runtime: Util.RuntimeOptions): ValidatYunSnsuBuyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.prodCode)) {
    query['ProdCode'] = request.prodCode;
  }
  if (!Util.isUnset(request.resourceOwnerAccount)) {
    query['ResourceOwnerAccount'] = request.resourceOwnerAccount;
  }
  if (!Util.isUnset(request.resourceOwnerId)) {
    query['ResourceOwnerId'] = request.resourceOwnerId;
  }
  if (!Util.isUnset(request.data)) {
    query['data'] = request.data;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ValidatYunSnsuBuy',
    version = '2018-07-10',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function validatYunSnsuBuy(request: ValidatYunSnsuBuyRequest): ValidatYunSnsuBuyResponse {
  var runtime = new Util.RuntimeOptions{};
  return validatYunSnsuBuyWithOptions(request, runtime);
}

